Linked mentions improvements and other fixes

This commit is contained in:
Zef Hemel
2023-10-09 20:39:03 +02:00
parent ae3e5f375e
commit 17ba536801
9 changed files with 97 additions and 36 deletions
+9 -3
View File
@@ -60,9 +60,15 @@ export class EventHook implements Hook<EventHookT> {
) {
// Only dispatch functions that can run in this environment
if (await plug.canInvoke(name)) {
const result = await plug.invoke(name, args);
if (result !== undefined) {
responses.push(result);
try {
const result = await plug.invoke(name, args);
if (result !== undefined) {
responses.push(result);
}
} catch (e: any) {
console.error(
`Error dispatching event ${eventName} to plug ${plug.name}: ${e.message}`,
);
}
}
}