From a721b317d25f0a6caead79ff9f38d746a9b084d0 Mon Sep 17 00:00:00 2001 From: Kevin Aleman Date: Mon, 16 Sep 2024 11:15:39 -0600 Subject: [PATCH 1/2] fix federation callback not awaiting model call --- apps/meteor/app/federation/server/hooks/afterUnsetReaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/app/federation/server/hooks/afterUnsetReaction.js b/apps/meteor/app/federation/server/hooks/afterUnsetReaction.js index 51181d88ab9e..995146b290bf 100644 --- a/apps/meteor/app/federation/server/hooks/afterUnsetReaction.js +++ b/apps/meteor/app/federation/server/hooks/afterUnsetReaction.js @@ -6,7 +6,7 @@ import { getFederationDomain } from '../lib/getFederationDomain'; import { clientLogger } from '../lib/logger'; async function afterUnsetReaction(message, { user, reaction }) { - const room = Rooms.findOneById(message.rid, { fields: { federation: 1 } }); + const room = await Rooms.findOneById(message.rid, { projection: { federation: 1 } }); // If there are not federated users on this room, ignore it if (!hasExternalDomain(room)) { From 6067d8aadd9b5b4199e8bd3e4c351e3d6f1ffb92 Mon Sep 17 00:00:00 2001 From: Kevin Aleman Date: Mon, 16 Sep 2024 11:18:55 -0600 Subject: [PATCH 2/2] Create great-humans-live.md --- .changeset/great-humans-live.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/great-humans-live.md diff --git a/.changeset/great-humans-live.md b/.changeset/great-humans-live.md new file mode 100644 index 000000000000..1d97d9da23ae --- /dev/null +++ b/.changeset/great-humans-live.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fixed a Federation callback not awaiting db call