Improve get_real_participant_order.
This commit is contained in:
parent
7987912230
commit
b0aa14c031
@ -1527,15 +1527,15 @@ void GroupCallManager::on_sync_group_call_participants_failed(InputGroupCallId i
|
||||
sync_participants_timeout_.add_timeout_in(group_call->group_call_id.get(), 1.0);
|
||||
}
|
||||
|
||||
GroupCallParticipantOrder GroupCallManager::get_real_participant_order(const GroupCallParticipant &participant,
|
||||
GroupCallParticipantOrder min_order) const {
|
||||
GroupCallParticipantOrder GroupCallManager::get_real_participant_order(
|
||||
const GroupCallParticipant &participant, const GroupCallParticipantOrder &min_order) const {
|
||||
auto real_order = participant.get_real_order();
|
||||
if (real_order < min_order && participant.is_self) {
|
||||
return min_order;
|
||||
}
|
||||
if (real_order >= min_order) {
|
||||
return real_order;
|
||||
}
|
||||
if (participant.is_self) {
|
||||
return min_order;
|
||||
}
|
||||
return GroupCallParticipantOrder();
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,7 @@ class GroupCallManager : public Actor {
|
||||
void on_sync_group_call_participants_failed(InputGroupCallId input_group_call_id);
|
||||
|
||||
GroupCallParticipantOrder get_real_participant_order(const GroupCallParticipant &participant,
|
||||
GroupCallParticipantOrder min_order) const;
|
||||
const GroupCallParticipantOrder &min_order) const;
|
||||
|
||||
void process_group_call_participants(InputGroupCallId group_call_id,
|
||||
vector<tl_object_ptr<telegram_api::groupCallParticipant>> &&participants,
|
||||
|
Loading…
Reference in New Issue
Block a user