From 998d022b2d6e405cd2c152edca79d73f34460479 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 18 Feb 2021 13:47:33 +0300 Subject: [PATCH] Add td_api::chatEventVoiceChatParticipantVolumeLevelChanged. --- td/generate/scheme/td_api.tl | 3 +++ td/generate/scheme/td_api.tlo | Bin 197148 -> 197308 bytes td/telegram/MessagesManager.cpp | 12 ++++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 9dfec93d9..f1085ef39 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -2455,6 +2455,9 @@ chatEventVoiceChatDiscarded group_call_id:int32 = ChatEventAction; //@description A voice chat participant was muted or unmuted @user_id Identifier of the affected user @is_muted New value of is_muted chatEventVoiceChatParticipantIsMutedToggled user_id:int32 is_muted:Bool = ChatEventAction; +//@description A voice chat participant volume level was changed @user_id Identifier of the affected user @volume_level New value of volume_level; 1-20000 in hundreds of percents +chatEventVoiceChatParticipantVolumeLevelChanged user_id:int32 volume_level:int32 = ChatEventAction; + //@description The mute_new_participants setting of a voice chat was toggled @mute_new_participants New value of the mute_new_participants setting chatEventVoiceChatMuteNewParticipantsToggled mute_new_participants:Bool = ChatEventAction; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index 2fbe17949b8d1fe9bab3d88e42c488b13607928e..4bd9704fd4c28738fb04c58bee8d28deefad4742 100644 GIT binary patch delta 769 zcmbQ!!n3E9X92tD@!d+{{LUGPC9Y+uc_og?C7Jno3X>-?iEq|nZ_#Be*}Tz2-iQUH zYVwsd8wf)rJp#fgNY{Wc4rCZW7#A=^3^LHwOvund)Ac1oLjq*Q&0|773_wui%%;O( z+jbCatx2W{SoySNObU~GGDRSImt?Bo*76_|V&`;)7fia7dp)G5JKSdCfM`s}g1W~c zRcG>!EFXv{M>f<=D56`kp=uvwLw#(M167xklK|0q0V*;n7b=jF3so`&Ch{W}YK%%A z)R=}msK}Z;XqdjqgX)sW&wv=*kq-^iJunfC0!TdJJd5l zO+JAsWKs(Ca6yC48#AR8aB^NGvMJOwKGw z%qt1Y&neAK^+_#D%>l~frKhHV(+S8xi4!W558UNs1|`=sr4A5p36wz?%^_v&A!Ur) KL&}&=bOQiw12Vh- delta 688 zcmdnf$}^{hX92tD{dXq2_?Q~o!sjoJ^jILCJutK{nLOHaSprIXMXsofn`YlX9T~DY;N3Q(z)La-qhk z?s4nfwfh!5#U~K-~iq(I|if#pHy70*IO`1qPh3kYk*_@DGzQ zMBJqiYFbGl)U*dM5rHD8J4=czAc{8>xj+~{ilDkQilJ(HiXkFsf&T@&a7+nQ^@DmQ rsM#klg-lAJUKS|RnY^GB8W1^U4p7%X8O>kH+P{=BZvRrobfOyoYQ##` diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 8727b4ce1..f31a1ad76 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -31371,8 +31371,16 @@ tl_object_ptr MessagesManager::get_chat_event_action_ob return make_tl_object( td_->contacts_manager_->get_user_id_object(participant.user_id, "LogEventActionParticipantUnmute"), false); } - case telegram_api::channelAdminLogEventActionParticipantVolume::ID: - return nullptr; + case telegram_api::channelAdminLogEventActionParticipantVolume::ID: { + auto action = move_tl_object_as(action_ptr); + GroupCallParticipant participant(std::move(action->participant_)); + if (!participant.is_valid()) { + return nullptr; + } + return make_tl_object( + td_->contacts_manager_->get_user_id_object(participant.user_id, "LogEventActionParticipantVolume"), + participant.volume_level); + } case telegram_api::channelAdminLogEventActionToggleGroupCallSetting::ID: { auto action = move_tl_object_as(action_ptr); return make_tl_object(action->join_muted_);