Skip to content

fix(sounds): fall back when the server has no play-sounds capability - #19239

Open
bakiburakogun wants to merge 1 commit into
nextcloud:mainfrom
bakiburakogun:fix/play-sounds-fallback
Open

fix(sounds): fall back when the server has no play-sounds capability#19239
bakiburakogun wants to merge 1 commit into
nextcloud:mainfrom
bakiburakogun:fix/play-sounds-fallback

Conversation

@bakiburakogun

@bakiburakogun bakiburakogun commented Sep 3, 2026

Copy link
Copy Markdown

☑️ Resolves

Since Talk 24 the sounds store reads the user's "play sounds" setting from the capabilities (config.call.play-sounds). That works against a Talk 24+ server, but servers before Talk 24 don't have that capability at all, so getTalkConfig('local', 'call', 'play-sounds') returns undefined there: sounds are off after every start and the toggle in the settings dialog doesn't stick, which is the talk-desktop issue above again (the 2.2.x desktop client bundles the Talk 24 frontend and still supports NC 32/33 servers), just with the default flipped to silent.

This keeps the capability as the first source and adds fallbacks for older servers:

  1. capability (Talk 24+)
  2. value remembered in browser storage
  3. initial state (play_sounds) that the web page of older servers still provides
  4. enabled, as before Talk 24

When the capability is missing, setShouldPlaySounds additionally mirrors the value to browser storage so the next start can pick it up. Guests are unchanged (storage first, then capability, then initial state). Against Talk 24+ nothing changes.

Known limitation on older servers: a change made in another browser/device isn't picked up until the toggle is used locally, since there is no way to read the value back. That's the same trade-off @Antreesy described in the linked issue.

Added a small spec for the store's initial value and the action; the store computes its initial value at import time, so the tests reload the module.

🖼️ Screenshots

n/a

🚧 Tasks

  • Code
  • Tests

🏁 Checklist

Since Talk 24 the sounds store takes the user's "play sounds" setting from
the capabilities (config.call.play-sounds). Servers before Talk 24 don't
expose it there, so against such a server getTalkConfig() returns undefined,
sounds are off after every start and the toggle in the settings dialog
doesn't stick.

Keep the capability as the first source and fall back to the value
remembered in browser storage, then to the initial state older servers
still provide, and finally to enabled. When the capability is missing,
also mirror the setting to browser storage on change so the next start
can pick it up.

Ref nextcloud/talk-desktop#1087

Signed-off-by: Baki Burak Ogun <63836730+bakiburakogun@users.noreply.github.com>
@nickvergessen

Copy link
Copy Markdown
Member

Hi @bakiburakogun thanks for your frequent involvement. In case you are interested you can send me an email to <my github handle>@nextcloud.com so I can invite you to our Talk Developer chat.
Also the Nextcloud Conference and Contributor Week is happening soon in Berlin, if you are close and want to join us there: https://nextcloud.com/conference-2026/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants