From d0e555429e1677c888b49a89ea730b0a404ac2fe Mon Sep 17 00:00:00 2001 From: Ricardo Garim Date: Mon, 16 Sep 2024 12:38:30 -0300 Subject: [PATCH] fix: correct parameter order in callbackHandler --- apps/meteor/app/integrations/server/triggers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/app/integrations/server/triggers.ts b/apps/meteor/app/integrations/server/triggers.ts index cdf8acda6a212..9b318799beabe 100644 --- a/apps/meteor/app/integrations/server/triggers.ts +++ b/apps/meteor/app/integrations/server/triggers.ts @@ -8,7 +8,7 @@ const callbackHandler = function _callbackHandler(eventType: string) { }; }; -callbacks.add('afterSaveMessage', callbackHandler('sendMessage'), callbacks.priority.LOW, 'integrations-sendMessage'); +callbacks.add('afterSaveMessage', (message, { room }) => callbackHandler('sendMessage')(message, room), callbacks.priority.LOW, 'integrations-sendMessage'); callbacks.add('afterCreateChannel', callbackHandler('roomCreated'), callbacks.priority.LOW, 'integrations-roomCreated'); callbacks.add('afterCreatePrivateGroup', callbackHandler('roomCreated'), callbacks.priority.LOW, 'integrations-roomCreated'); callbacks.add('afterCreateUser', callbackHandler('userCreated'), callbacks.priority.LOW, 'integrations-userCreated');