From 037506c0b7f9040e7f2ccd9b3dd769d69d974a84 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 28 Jan 2021 03:52:53 +0300 Subject: [PATCH] Fixed local applying of mute participant state in group calls. --- Telegram/SourceFiles/calls/calls_group_call.cpp | 7 +++++-- Telegram/SourceFiles/calls/calls_group_members.cpp | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/calls/calls_group_call.cpp b/Telegram/SourceFiles/calls/calls_group_call.cpp index 81b7663530..b0ec7c6559 100644 --- a/Telegram/SourceFiles/calls/calls_group_call.cpp +++ b/Telegram/SourceFiles/calls/calls_group_call.cpp @@ -411,8 +411,11 @@ void GroupCall::applyParticipantLocally( const auto flags = (canSelfUnmute ? Flag::f_can_self_unmute : Flag(0)) | (volume.has_value() ? Flag::f_volume : Flag(0)) | (participant->lastActive ? Flag::f_active_date : Flag(0)) - | (mute ? Flag::f_muted : Flag(0)) - | (participant->mutedByMe ? Flag::f_muted_by_you : Flag(0)); + | (!mute + ? Flag(0) + : user->canManageGroupCall() + ? Flag::f_muted + : Flag::f_muted_by_you); _peer->groupCall()->applyUpdateChecked( MTP_updateGroupCallParticipants( inputCall(), diff --git a/Telegram/SourceFiles/calls/calls_group_members.cpp b/Telegram/SourceFiles/calls/calls_group_members.cpp index a1ffe11519..af49f8ef44 100644 --- a/Telegram/SourceFiles/calls/calls_group_members.cpp +++ b/Telegram/SourceFiles/calls/calls_group_members.cpp @@ -394,7 +394,9 @@ void Row::setSpeaking(bool speaking) { _speaking ? 1. : 0., st::widgetFadeDuration); - if (!_speaking || (_state == State::MutedByMe)) { + if (!_speaking + || (_state == State::MutedByMe) + || (_state == State::Muted)) { _statusIcon = nullptr; } else if (!_statusIcon) { _statusIcon = std::make_unique(