Skip to content

Commit

Permalink
feat: check if should play sounds when receiving a new message
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Oct 7, 2023
1 parent 11af340 commit e1a4dbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/broker/delegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit e1a4dbc

Please sign in to comment.