Skip to content

Commit

Permalink
fix: Federation callback not awaiting model call (#33298)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevLehman committed Sep 20, 2024
1 parent 04a1692 commit 0a53748
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/great-humans-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed a Federation callback not awaiting db call
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 0a53748

Please sign in to comment.