From c15ab3f44d56700bf05018825481318dc2a87d66 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Tue, 17 Dec 2024 16:02:21 -0300 Subject: [PATCH 1/2] only triggers `notifyNewRoom` on added event collection --- apps/meteor/client/hooks/useNotifyUser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/client/hooks/useNotifyUser.ts b/apps/meteor/client/hooks/useNotifyUser.ts index 5409963ce153..baa804908e8a 100644 --- a/apps/meteor/client/hooks/useNotifyUser.ts +++ b/apps/meteor/client/hooks/useNotifyUser.ts @@ -69,7 +69,7 @@ export const useNotifyUser = () => { }); const handle = CachedChatSubscription.collection.find().observe({ - changed: (sub) => { + added: (sub) => { void notifyNewRoom(sub); }, }); From e66a7a87c728c86ee76728f22a0f52b6450d83da Mon Sep 17 00:00:00 2001 From: dougfabris Date: Wed, 18 Dec 2024 11:15:42 -0300 Subject: [PATCH 2/2] chore: changeset --- .changeset/wise-queens-build.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/wise-queens-build.md diff --git a/.changeset/wise-queens-build.md b/.changeset/wise-queens-build.md new file mode 100644 index 000000000000..51e54de4a6bd --- /dev/null +++ b/.changeset/wise-queens-build.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixes an issue where the notification sound was playing randomly