From eddbbe0d4271911659c9d8fda0713a3e9e9d7a6d Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 15 Sep 2019 04:59:22 +0300 Subject: [PATCH] Process updateFolderPeers before new messages. GitOrigin-RevId: 53baf318d3bf1d1f356a47cb89c2bb4e61880fc2 --- td/telegram/UpdatesManager.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/td/telegram/UpdatesManager.cpp b/td/telegram/UpdatesManager.cpp index 5b98a5bc..6da480f2 100644 --- a/td/telegram/UpdatesManager.cpp +++ b/td/telegram/UpdatesManager.cpp @@ -946,6 +946,11 @@ void UpdatesManager::process_get_difference_updates( CHECK(!running_get_difference_); } + if (constructor_id == telegram_api::updateFolderPeers::ID) { + on_update(move_tl_object_as(update), true); + CHECK(!running_get_difference_); + } + /* // TODO can't apply it here, because dialog may not be created yet // process updateReadHistoryInbox before new messages @@ -1185,8 +1190,13 @@ void UpdatesManager::on_pending_updates(vector(update), false); + processed_updates++; + update = nullptr; + } + CHECK(!running_get_difference_); } } @@ -1196,7 +1206,7 @@ void UpdatesManager::on_pending_updates(vector