Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.

Commit efa647e

Browse files
authored
Release/1.42.2 (#764)
2 parents 1096aa2 + 8c51bcf commit efa647e

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rocket.chat/apps-engine",
3-
"version": "1.42.1",
3+
"version": "1.42.2",
44
"description": "The engine code for the Rocket.Chat Apps which manages, runs, translates, coordinates and all of that.",
55
"main": "index",
66
"typings": "index",

src/server/managers/AppListenerManager.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ export class AppListenerManager {
239239

240240
private listeners: Map<string, Array<string>>;
241241

242+
private defaultHandlers = new Map<string, any>();
243+
242244
/**
243245
* Locked events are those who are listed in an app's
244246
* "essentials" list but the app is disabled.
@@ -256,6 +258,8 @@ export class AppListenerManager {
256258
this.listeners.set(intt, []);
257259
this.lockedEvents.set(intt, new Set<string>());
258260
});
261+
262+
this.defaultHandlers.set('executeViewClosedHandler', { success: true });
259263
}
260264

261265
public registerListeners(app: ProxiedApp): void {
@@ -1052,7 +1056,12 @@ export class AppListenerManager {
10521056

10531057
const app = this.manager.getOneById(appId);
10541058
if (!app?.hasMethod(method)) {
1055-
console.warn(`App ${appId} triggered an interaction but it doen't exist or doesn't have method ${method}`);
1059+
if (this.defaultHandlers.has(method)) {
1060+
console.warn(`App ${appId} triggered an interaction but it doesn't exist or doesn't have method ${method}. Falling back to default handler.`);
1061+
return this.defaultHandlers.get(method);
1062+
}
1063+
1064+
console.warn(`App ${appId} triggered an interaction but it doesn't exist or doesn't have method ${method} and there is no default handler for it.`);
10561065
return;
10571066
}
10581067

0 commit comments

Comments
 (0)