mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Apply volume_by_admin flag in voice chats.
This commit is contained in:
@@ -276,9 +276,14 @@ void GroupCall::applyParticipantsSlice(
|
||||
&& ((was ? was->speaking : false)
|
||||
|| (!amInCall
|
||||
&& (lastActive + speakingAfterActive > now)));
|
||||
const auto volume = (was && data.is_min())
|
||||
const auto volume = (was
|
||||
&& !was->applyVolumeFromMin
|
||||
&& data.is_min())
|
||||
? was->volume
|
||||
: data.vvolume().value_or(Calls::Group::kDefaultVolume);
|
||||
const auto applyVolumeFromMin = (was && data.is_min())
|
||||
? was->applyVolumeFromMin
|
||||
: (data.is_min() || data.is_volume_by_admin());
|
||||
const auto mutedByMe = (was && data.is_min())
|
||||
? was->mutedByMe
|
||||
: data.is_muted_by_you();
|
||||
@@ -290,6 +295,7 @@ void GroupCall::applyParticipantsSlice(
|
||||
.lastActive = lastActive,
|
||||
.ssrc = uint32(data.vsource().v),
|
||||
.volume = volume,
|
||||
.applyVolumeFromMin = applyVolumeFromMin,
|
||||
.speaking = canSelfUnmute && (was ? was->speaking : false),
|
||||
.muted = data.is_muted(),
|
||||
.mutedByMe = mutedByMe,
|
||||
|
Reference in New Issue
Block a user