Keep biggest update list for a given version instead of forced sync.

This commit is contained in:
levlam 2020-12-16 18:40:51 +03:00
parent 0e668726bc
commit ca242e754b

View File

@ -905,10 +905,9 @@ void GroupCallManager::on_update_group_call_participants(
group_call_participants = make_unique<GroupCallParticipants>(); group_call_participants = make_unique<GroupCallParticipants>();
} }
auto &pending_updates = group_call_participants->pending_updates_[version]; auto &pending_updates = group_call_participants->pending_updates_[version];
if (!pending_updates.empty()) { if (participants.size() <= pending_updates.size()) {
LOG(INFO) << "Receive duplicate updateGroupCallParticipants with version " << version << " in " LOG(INFO) << "Receive duplicate updateGroupCallParticipants with version " << version << " in "
<< input_group_call_id; << input_group_call_id;
sync_group_call_participants(input_group_call_id);
return; return;
} }
pending_updates = std::move(participants); pending_updates = std::move(participants);