Try to process versioned updates with old version.

This commit is contained in:
levlam 2021-03-19 02:51:50 +03:00
parent 6656cd29f9
commit af7e26bc49

View File

@ -1532,8 +1532,8 @@ bool GroupCallManager::process_pending_group_call_participant_updates(InputGroup
for (auto &participant_it : participants) {
auto &participant = participant_it.second;
on_participant_speaking_in_group_call(input_group_call_id, participant);
if (participant.is_self) {
process_my_group_call_participant(input_group_call_id, std::move(participant));
if (participant.is_self || participant.joined_date != 0) {
diff += process_group_call_participant(input_group_call_id, std::move(participant));
}
}
LOG(INFO) << "Ignore already applied updateGroupCallParticipants with version " << version << " in "
@ -1856,6 +1856,11 @@ int GroupCallManager::process_group_call_participant(InputGroupCallId input_grou
return -1;
}
if (old_participant.version > participant.version) {
LOG(INFO) << "Ignore outdated update of " << old_participant.dialog_id;
return 0;
}
if (old_participant.dialog_id != participant.dialog_id) {
on_remove_group_call_participant(input_group_call_id, old_participant.dialog_id);
on_add_group_call_participant(input_group_call_id, participant.dialog_id);