Add GroupCallParticipant,can_enable_video.

This commit is contained in:
levlam 2021-06-01 23:57:04 +03:00
parent 0202ade138
commit 6eb49775de
3 changed files with 8 additions and 5 deletions

View File

@ -2181,6 +2181,7 @@ groupCallParticipantVideoInfo source_groups:vector<groupCallVideoSourceGroup> en
//@description Represents a group call participant
//@participant_id Identifier of the group call participant
//@audio_source_id User's audio channel synchronization source identifier
//@can_enable_video True, if the user can broadcast video or share screen
//@video_info Information about user's video channel; may be null if there is no active video
//@screen_sharing_video_info Information about user's screen sharing video channel; may be null if there is no active screen sharing video
//@bio The participant user's bio or the participant chat's description
@ -2196,7 +2197,7 @@ groupCallParticipantVideoInfo source_groups:vector<groupCallVideoSourceGroup> en
//@can_unmute_self True, if the participant is muted for all users, but can unmute themself
//@volume_level Participant's volume level; 1-20000 in hundreds of percents
//@order User's order in the group call participant list. Orders must be compared lexicographically. The bigger is order, the higher is user in the list. If order is empty, the user must be removed from the participant list
groupCallParticipant participant_id:MessageSender audio_source_id:int32 video_info:groupCallParticipantVideoInfo screen_sharing_video_info:groupCallParticipantVideoInfo bio:string is_current_user:Bool is_speaking:Bool is_hand_raised:Bool can_be_muted_for_all_users:Bool can_be_unmuted_for_all_users:Bool can_be_muted_for_current_user:Bool can_be_unmuted_for_current_user:Bool is_muted_for_all_users:Bool is_muted_for_current_user:Bool can_unmute_self:Bool volume_level:int32 order:string = GroupCallParticipant;
groupCallParticipant participant_id:MessageSender audio_source_id:int32 can_enable_video:Bool video_info:groupCallParticipantVideoInfo screen_sharing_video_info:groupCallParticipantVideoInfo bio:string is_current_user:Bool is_speaking:Bool is_hand_raised:Bool can_be_muted_for_all_users:Bool can_be_unmuted_for_all_users:Bool can_be_muted_for_current_user:Bool can_be_unmuted_for_current_user:Bool is_muted_for_all_users:Bool is_muted_for_current_user:Bool can_unmute_self:Bool volume_level:int32 order:string = GroupCallParticipant;
//@description Describes a media channel in a group call @source_id Channel's synchronization source identifier @is_video True if the channel is a video channel @param_description Description of the channel
groupCallMediaChannelDescription source_id:int32 is_video:Bool description:string = GroupCallMediaChannelDescription;

View File

@ -25,6 +25,7 @@ GroupCallParticipant::GroupCallParticipant(const tl_object_ptr<telegram_api::gro
server_is_muted_by_themselves = participant->can_self_unmute_;
server_is_muted_by_admin = participant->muted_ && !participant->can_self_unmute_;
server_is_muted_locally = participant->muted_by_you_;
can_enable_video = participant->video_joined_;
is_self = participant->self_;
if ((participant->flags_ & telegram_api::groupCallParticipant::VOLUME_MASK) != 0) {
volume_level = participant->volume_;
@ -254,7 +255,7 @@ td_api::object_ptr<td_api::groupCallParticipant> GroupCallParticipant::get_group
}
return td_api::make_object<td_api::groupCallParticipant>(
td->messages_manager_->get_message_sender_object(dialog_id), audio_source,
td->messages_manager_->get_message_sender_object(dialog_id), audio_source, can_enable_video,
get_group_call_participant_video_info_object(video_payload),
get_group_call_participant_video_info_object(presentation_payload), about, is_self, is_speaking,
get_is_hand_raised(), can_be_muted_for_all_users, can_be_unmuted_for_all_users, can_be_muted_only_for_self,
@ -264,9 +265,9 @@ td_api::object_ptr<td_api::groupCallParticipant> GroupCallParticipant::get_group
bool operator==(const GroupCallParticipant &lhs, const GroupCallParticipant &rhs) {
return lhs.dialog_id == rhs.dialog_id && lhs.audio_source == rhs.audio_source &&
lhs.video_payload == rhs.video_payload && lhs.presentation_payload == rhs.presentation_payload &&
lhs.about == rhs.about && lhs.is_self == rhs.is_self && lhs.is_speaking == rhs.is_speaking &&
lhs.get_is_hand_raised() == rhs.get_is_hand_raised() &&
lhs.can_enable_video == rhs.can_enable_video && lhs.video_payload == rhs.video_payload &&
lhs.presentation_payload == rhs.presentation_payload && lhs.about == rhs.about && lhs.is_self == rhs.is_self &&
lhs.is_speaking == rhs.is_speaking && lhs.get_is_hand_raised() == rhs.get_is_hand_raised() &&
lhs.can_be_muted_for_all_users == rhs.can_be_muted_for_all_users &&
lhs.can_be_unmuted_for_all_users == rhs.can_be_unmuted_for_all_users &&
lhs.can_be_muted_only_for_self == rhs.can_be_muted_only_for_self &&

View File

@ -29,6 +29,7 @@ struct GroupCallParticipant {
int32 active_date = 0;
int32 volume_level = 10000;
int64 raise_hand_rating = 0;
bool can_enable_video = false;
bool is_volume_level_local = false;
bool server_is_muted_by_themselves = false;
bool server_is_muted_by_admin = false;