Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop sound notification not playing when account preference not overridden #21504

Open
chaperonRose opened this issue Apr 9, 2021 · 3 comments

Comments

@chaperonRose
Copy link

Description:

It seems sound notification for a new message is not played when only account preference is set (and per channel is "default").

Steps to reproduce:

  1. In your account preferences, in Sound section, check new message notification option. I have for example "Chime".
  2. Go to a channel and in its notification preferences.
  3. Check in Desktop, that audio option is not set to never play sound.
  4. Check in Desktop, that sound selection is Default.
  5. Result : New message don't play the sound. (NOK)

Then :

  1. Go back to the channel and in its notification preferences.
  2. Choose another sound in Desktop > Sound (for example Seasons).
  3. Result : New message do play the selected sound. (OK)

Then :

  1. Go back to the channel and its notification preferences.
  2. Choose default for Desktop > Sound.
  3. Go to your account preferences, in Sound section.
  4. Select another sound in new message notification option (for example Seasons).
  5. Résult : New message don't play the sound. (NOK)

Expected behavior:

The sound set in account preferences should play even if not overridden in channel preferences.

Actual behavior:

See "Steps to reproduce".

Server Setup Information:

  • Version of Rocket.Chat Server: 3.13.1
  • Operating System: Linux

Client Setup Information

  • Desktop App or Browser Version: Firefox ESR and Chromium
@chaperonRose
Copy link
Author

There is an old issue still open : #12286
Its second part is similar : i quote @lcharette

I'm also having an issue when no sound is played with the notification (MacOS electron app) when "default", or "Use Account Preference", is set in the channel notification setting. Changing the sound in the channel setting (while keeping Chime the default one), produce sound. I believe both issue could be linked, or at lest this second issue could be fixed if there was a way to specifically define "Chime" as the per channel notification sound.

@scrivna
Copy link
Contributor

scrivna commented May 13, 2021

I have been doing some work on notifications and discovered the cause of the problem, the UI saves the value 'default' for the audioNotificationValue - however the client-side doesn't know what to do with that value. It's expecting the value '0'.

See

if (sub && sub.audioNotificationValue && sub.audioNotificationValue !== '0') {

I would suggest fix is to simply replace it with this...

if (sub && sub.audioNotificationValue && sub.audioNotificationValue !== '0' && sub.audioNotificationValue !== 'default') {

amirhmoradi added a commit to amirhmoradi/Rocket.Chat that referenced this issue Oct 25, 2021
@brknapik
Copy link

Still exists on 4.3.3 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants