diff --git a/src/core/subscriptions.ts b/src/core/subscriptions.ts index 16590afd..c713d3f0 100644 --- a/src/core/subscriptions.ts +++ b/src/core/subscriptions.ts @@ -85,7 +85,9 @@ export const subscribeAll = ( ...messagePacket, state: messagePacket.from !== myNodeNum ? "ack" : "waiting", }); - playNotificationSound(); + if(messagePacket.from !== myNodeNum){ + playNotificationSound(); + } }); connection.events.onPendingSettingsChange.subscribe((state) => { diff --git a/src/core/utils/notify.ts b/src/core/utils/notify.ts index 3ffec809..ef0f0f99 100644 --- a/src/core/utils/notify.ts +++ b/src/core/utils/notify.ts @@ -10,6 +10,7 @@ export const playNotificationSound = () => { isPlaying = true; notificationSound.play(); + notificationSound.onended = () => { isPlaying = false; };