Count presentation in has_video.

This commit is contained in:
levlam 2021-07-13 03:17:46 +03:00
parent fa792176cd
commit 49ab03be83
2 changed files with 3 additions and 3 deletions

View File

@ -2170,7 +2170,7 @@ groupCallRecentSpeaker participant_id:MessageSender is_speaking:Bool = GroupCall
//@recent_speakers Recently speaking users in the group call
//@is_my_video_enabled True, if the current user's video is enabled
//@is_my_video_paused True, if the current user's video is paused
//@can_enable_video True, if the user can broadcast video or share screen
//@can_enable_video True, if the current user can broadcast video or share screen
//@mute_new_participants True, if only group call administrators can unmute new participants
//@can_change_mute_new_participants True, if the current user can enable or disable mute_new_participants setting
//@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

View File

@ -66,7 +66,7 @@ GroupCallParticipant::GroupCallParticipant(const tl_object_ptr<telegram_api::gro
presentation_payload = GroupCallVideoPayload(participant->presentation_.get());
}
if (is_just_joined && !video_payload.is_empty()) {
if (is_just_joined && get_has_video()) {
video_diff++;
}
if (joined_date == 0) {
@ -116,7 +116,7 @@ bool GroupCallParticipant::get_is_hand_raised() const {
}
int32 GroupCallParticipant::get_has_video() const {
return video_payload.is_empty() ? 0 : 1;
return video_payload.is_empty() && presentation_payload.is_empty() ? 0 : 1;
}
void GroupCallParticipant::update_from(const GroupCallParticipant &old_participant) {