From e1a4dbcd16e9cd8ef36a5f2829ee344b5693f6b5 Mon Sep 17 00:00:00 2001 From: Valerian Saliou Date: Sat, 7 Oct 2023 23:22:44 +0200 Subject: [PATCH] feat: check if should play sounds when receiving a new message --- src/broker/delegate.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/broker/delegate.ts b/src/broker/delegate.ts index 71637ae2..a7dcc358 100644 --- a/src/broker/delegate.ts +++ b/src/broker/delegate.ts @@ -99,7 +99,10 @@ class BrokerDelegate implements ProseClientDelegate { ); // Play incoming message sound? (only for messages from remote users) - if (hasInserted === true) { + if ( + hasInserted === true && + Store.$settings.notifications.action.notify.sound === true + ) { const selfJIDRaw = Store.$account.getLocalJID().toString(); const firstNonSelfMessage = messages.find(message => {