Skip to content

Commit

Permalink
Merge pull request #36848 from rayane-djouah/Fix-Sounds-for-receiving…
Browse files Browse the repository at this point in the history
…-message-and-for-being-tagged-somewhere

Fix: When a user is mentioned, a sound is triggered. However, the current implementation plays the sound regardless of who is mentioned.
  • Loading branch information
Julesssss authored Feb 21, 2024
2 parents 2fc1d53 + e661325 commit 74540f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ function playSoundForMessageType(pushJSON: OnyxServerUpdate[]) {
}

// mention user
if ('html' in message && typeof message.html === 'string' && message.html.includes('<mention-user>')) {
if ('html' in message && typeof message.html === 'string' && message.html.includes(`<mention-user>@${currentEmail}</mention-user>`)) {
return playSound(SOUNDS.ATTENTION);
}

Expand Down

0 comments on commit 74540f8

Please sign in to comment.