Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rocket.chat/apps-engine",
"version": "1.42.1",
"version": "1.42.2",
"description": "The engine code for the Rocket.Chat Apps which manages, runs, translates, coordinates and all of that.",
"main": "index",
"typings": "index",
Expand Down
11 changes: 10 additions & 1 deletion src/server/managers/AppListenerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ export class AppListenerManager {

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

private defaultHandlers = new Map<string, any>();

/**
* Locked events are those who are listed in an app's
* "essentials" list but the app is disabled.
Expand All @@ -256,6 +258,8 @@ export class AppListenerManager {
this.listeners.set(intt, []);
this.lockedEvents.set(intt, new Set<string>());
});

this.defaultHandlers.set('executeViewClosedHandler', { success: true });
}

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

const app = this.manager.getOneById(appId);
if (!app?.hasMethod(method)) {
console.warn(`App ${appId} triggered an interaction but it doen't exist or doesn't have method ${method}`);
if (this.defaultHandlers.has(method)) {
console.warn(`App ${appId} triggered an interaction but it doesn't exist or doesn't have method ${method}. Falling back to default handler.`);
return this.defaultHandlers.get(method);
}

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.`);
return;
}

Expand Down