Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

Commit a666dbb

Browse files
committed
[FIX] Chime on every message to chime on direct and mention messages
1 parent 5e0d2f0 commit a666dbb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • client/src/components/SignedLeftSidebar

client/src/components/SignedLeftSidebar/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ export default function SignedLeftSidebar(props) {
127127
if (fromOpenedRoom && hasFocus) {
128128
break;
129129
}
130-
document.getElementById("custom-sound-chime").play();
131130
let noty = new Notification(`${title}`, {
132131
body: `${text}`,
133132
});
@@ -173,6 +172,11 @@ export default function SignedLeftSidebar(props) {
173172
document.getElementById("custom-sound-door").play();
174173
addRoom(e.data.data);
175174
}
175+
if (rooms["conversations"] &&
176+
rooms["conversations"][e.data.data._id] && e.data.data.unread > 0) {
177+
console.log(e.data.data);
178+
document.getElementById("custom-sound-chime").play();
179+
}
176180
break;
177181
case "room-opened":
178182
if (

0 commit comments

Comments
 (0)