Add groupCall.has_hidden_listeners.

This commit is contained in:
levlam 2022-03-01 02:33:14 +03:00
parent 11d21d7af4
commit 84af0e176f
2 changed files with 12 additions and 4 deletions

View File

@ -2350,6 +2350,7 @@ groupCallRecentSpeaker participant_id:MessageSender is_speaking:Bool = GroupCall
//@need_rejoin True, if user was kicked from the call because of network loss and the call needs to be rejoined //@need_rejoin True, if user was kicked from the call because of network loss and the call needs to be rejoined
//@can_be_managed True, if the current user can manage the group call //@can_be_managed True, if the current user can manage the group call
//@participant_count Number of participants in the group call //@participant_count Number of participants in the group call
//@has_hidden_listeners True, if group call participants, which are muted, aren't returned in participant list
//@loaded_all_participants True, if all group call participants are loaded //@loaded_all_participants True, if all group call participants are loaded
//@recent_speakers At most 3 recently speaking users in the group call //@recent_speakers At most 3 recently speaking users in the group call
//@is_my_video_enabled True, if the current user's video is enabled //@is_my_video_enabled True, if the current user's video is enabled
@ -2360,7 +2361,7 @@ groupCallRecentSpeaker participant_id:MessageSender is_speaking:Bool = GroupCall
//@record_duration Duration of the ongoing group call recording, in seconds; 0 if none. An updateGroupCall update is not triggered when value of this field changes, but the same recording goes on //@record_duration Duration of the ongoing group call recording, in seconds; 0 if none. An updateGroupCall update is not triggered when value of this field changes, but the same recording goes on
//@is_video_recorded True, if a video file is being recorded for the call //@is_video_recorded True, if a video file is being recorded for the call
//@duration Call duration, in seconds; for ended calls only //@duration Call duration, in seconds; for ended calls only
groupCall id:int32 title:string scheduled_start_date:int32 enabled_start_notification:Bool is_active:Bool is_rtmp_stream:Bool is_joined:Bool need_rejoin:Bool can_be_managed:Bool participant_count:int32 loaded_all_participants:Bool recent_speakers:vector<groupCallRecentSpeaker> is_my_video_enabled:Bool is_my_video_paused:Bool can_enable_video:Bool mute_new_participants:Bool can_toggle_mute_new_participants:Bool record_duration:int32 is_video_recorded:Bool duration:int32 = GroupCall; groupCall id:int32 title:string scheduled_start_date:int32 enabled_start_notification:Bool is_active:Bool is_rtmp_stream:Bool is_joined:Bool need_rejoin:Bool can_be_managed:Bool participant_count:int32 has_hidden_listeners:Bool loaded_all_participants:Bool recent_speakers:vector<groupCallRecentSpeaker> is_my_video_enabled:Bool is_my_video_paused:Bool can_enable_video:Bool mute_new_participants:Bool can_toggle_mute_new_participants:Bool record_duration:int32 is_video_recorded:Bool duration:int32 = GroupCall;
//@description Describes a group of video synchronization source identifiers @semantics The semantics of sources, one of "SIM" or "FID" @source_ids The list of synchronization source identifiers //@description Describes a group of video synchronization source identifiers @semantics The semantics of sources, one of "SIM" or "FID" @source_ids The list of synchronization source identifiers
groupCallVideoSourceGroup semantics:string source_ids:vector<int32> = GroupCallVideoSourceGroup; groupCallVideoSourceGroup semantics:string source_ids:vector<int32> = GroupCallVideoSourceGroup;

View File

@ -891,6 +891,7 @@ struct GroupCallManager::GroupCall {
bool is_speaking = false; bool is_speaking = false;
bool can_self_unmute = false; bool can_self_unmute = false;
bool can_be_managed = false; bool can_be_managed = false;
bool has_hidden_listeners = false;
bool syncing_participants = false; bool syncing_participants = false;
bool need_syncing_participants = false; bool need_syncing_participants = false;
bool loaded_all_participants = false; bool loaded_all_participants = false;
@ -4190,6 +4191,7 @@ InputGroupCallId GroupCallManager::update_group_call(const tl_object_ptr<telegra
input_group_call_id = InputGroupCallId(group_call->id_, group_call->access_hash_); input_group_call_id = InputGroupCallId(group_call->id_, group_call->access_hash_);
call.is_active = true; call.is_active = true;
call.is_rtmp_stream = group_call->rtmp_stream_; call.is_rtmp_stream = group_call->rtmp_stream_;
call.has_hidden_listeners = group_call->listeners_hidden_;
call.title = group_call->title_; call.title = group_call->title_;
call.start_subscribed = group_call->schedule_start_subscribed_; call.start_subscribed = group_call->schedule_start_subscribed_;
call.mute_new_participants = group_call->join_muted_; call.mute_new_participants = group_call->join_muted_;
@ -4316,6 +4318,10 @@ InputGroupCallId GroupCallManager::update_group_call(const tl_object_ptr<telegra
group_call->is_rtmp_stream = call.is_rtmp_stream; group_call->is_rtmp_stream = call.is_rtmp_stream;
need_update = true; need_update = true;
} }
if (call.has_hidden_listeners != group_call->has_hidden_listeners) {
group_call->has_hidden_listeners = call.has_hidden_listeners;
need_update = true;
}
if ((call.unmuted_video_count != group_call->unmuted_video_count || if ((call.unmuted_video_count != group_call->unmuted_video_count ||
call.unmuted_video_limit != group_call->unmuted_video_limit) && call.unmuted_video_limit != group_call->unmuted_video_limit) &&
call.can_enable_video_version >= group_call->can_enable_video_version) { call.can_enable_video_version >= group_call->can_enable_video_version) {
@ -4645,7 +4651,8 @@ bool GroupCallManager::set_group_call_participant_count(GroupCall *group_call, i
<< group_call->dialog_id; << group_call->dialog_id;
} }
count = known_participant_count; count = known_participant_count;
} else if (group_call->loaded_all_participants && count > known_participant_count) { } else if (group_call->loaded_all_participants && !group_call->has_hidden_listeners &&
count > known_participant_count) {
if (group_call->joined_date_asc) { if (group_call->joined_date_asc) {
group_call->loaded_all_participants = false; group_call->loaded_all_participants = false;
result = true; result = true;
@ -4786,8 +4793,8 @@ tl_object_ptr<td_api::groupCall> GroupCallManager::get_group_call_object(
return td_api::make_object<td_api::groupCall>( return td_api::make_object<td_api::groupCall>(
group_call->group_call_id.get(), get_group_call_title(group_call), scheduled_start_date, start_subscribed, group_call->group_call_id.get(), get_group_call_title(group_call), scheduled_start_date, start_subscribed,
is_active, group_call->is_rtmp_stream, is_joined, group_call->need_rejoin, group_call->can_be_managed, is_active, group_call->is_rtmp_stream, is_joined, group_call->need_rejoin, group_call->can_be_managed,
group_call->participant_count, group_call->loaded_all_participants, std::move(recent_speakers), group_call->participant_count, group_call->has_hidden_listeners, group_call->loaded_all_participants,
is_my_video_enabled, is_my_video_paused, can_enable_video, mute_new_participants, std::move(recent_speakers), is_my_video_enabled, is_my_video_paused, can_enable_video, mute_new_participants,
can_toggle_mute_new_participants, record_duration, is_video_recorded, group_call->duration); can_toggle_mute_new_participants, record_duration, is_video_recorded, group_call->duration);
} }