Skip to content

Commit

Permalink
fix(Omnichannel): nonstop sound on current chats using continuous not…
Browse files Browse the repository at this point in the history
…ifications (#32572)
  • Loading branch information
MartinSchoeler authored and debdutdeb committed Jun 12, 2024
1 parent b1be2d5 commit 4872b3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/thin-suns-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixes issues causing nonstop sound notification when taking a chat from the `Current Chats` view
6 changes: 4 additions & 2 deletions apps/meteor/client/views/room/body/hooks/useUnreadMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ export const useHandleUnread = (
const debouncedReadMessageRead = useMemo(
() =>
withDebouncing({ wait: 500 })(() => {
chat.readStateManager.attemptMarkAsRead();
if (subscribed) {
chat.readStateManager.attemptMarkAsRead();
}
}),
[chat.readStateManager],
[chat.readStateManager, subscribed],
);

useEffect(
Expand Down

0 comments on commit 4872b3d

Please sign in to comment.