From 35a0a7c3836c8e684a4a684e65312ff3666c5617 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 10 May 2022 21:48:06 +0300 Subject: [PATCH] Ignore empty next_offset in group calls with new participants added to the end of the list. --- td/telegram/GroupCallManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/td/telegram/GroupCallManager.cpp b/td/telegram/GroupCallManager.cpp index a6d206ced..934edbb58 100644 --- a/td/telegram/GroupCallManager.cpp +++ b/td/telegram/GroupCallManager.cpp @@ -1632,7 +1632,11 @@ void GroupCallManager::on_get_group_call_participants( if (is_load) { auto *group_call_participants = add_group_call_participants(input_group_call_id); if (group_call_participants->next_offset == offset) { - group_call_participants->next_offset = std::move(participants->next_offset_); + if (!offset.empty() && participants->next_offset_.empty() && group_call_participants->joined_date_asc) { + LOG(INFO) << "Ignore empty next_offset"; + } else { + group_call_participants->next_offset = std::move(participants->next_offset_); + } } if (is_empty || is_sync) {