Skip to content

Stop the call volume slider at 1% when muting is not possible - #31297

Open
meh7an wants to merge 1 commit into
telegramdesktop:devfrom
meh7an:fix/call-volume-slider-min
Open

Stop the call volume slider at 1% when muting is not possible#31297
meh7an wants to merge 1 commit into
telegramdesktop:devfrom
meh7an:fix/call-volume-slider-min

Conversation

@meh7an

@meh7an meh7an commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Releasing a voice chat participant's volume slider at 0% doesn't set their volume to zero. MenuVolumeItem sends a mute request instead, because the lowest volume phone.editGroupCallParticipant accepts is 1: a request with volume 0 is rejected with USER_VOLUME_INVALID.

That mute doesn't always stick:

  • On your own row, it mutes your microphone, which changes nothing when the microphone is already muted, and your volume stays as it was.
  • For another call admin, when you manage the call, the server keeps them able to unmute themselves.

In both cases the slider went back to the previous volume the next time the menu was opened, so 0% looked ignored. For example, a call admin dragging their own volume to 0% saw it return to where it was.

Now Members::Controller tells the volume item whether the participant can be muted from it, through MenuVolumeItem::setCanMute(). When they can't, the slider's adjust callback keeps the value at 1% or above, so dragging it to the left end stops at 1% and sets that volume. For participants who can be muted, 0% still mutes them, and the Mute menu item is unchanged.

Testing

Built and tested on macOS (Debug), in a voice chat managed by the account:

  • The own volume slider stops at 1% and keeps that volume, with the microphone both muted and unmuted, and the microphone state doesn't change.
  • A regular participant is still muted at 0%.

Before this change, a build that sent volume 0 instead of the mute was tried on the own account, another account and a regular participant, and the server rejected it with USER_VOLUME_INVALID every time.

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

Successfully merging this pull request may close these issues.

1 participant