From 61b770c5a71b39a224d1b37ade58436e0c97f43f Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 12 Dec 2018 06:00:11 +0300 Subject: [PATCH] Add ContactsManager::after_get_difference. GitOrigin-RevId: 9fdea971dd5320da59b0aaeba45bff0c3ea2fc0e --- td/telegram/ContactsManager.cpp | 4 ++++ td/telegram/ContactsManager.h | 2 ++ td/telegram/MessagesManager.cpp | 3 --- td/telegram/UpdatesManager.cpp | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 1c44e1324..b54481ce8 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -9933,6 +9933,10 @@ UserId ContactsManager::get_support_user(Promise &&promise) { return UserId(); } +void ContactsManager::after_get_difference() { + get_user(get_my_id(), 3, Promise()); +} + void ContactsManager::get_current_state(vector> &updates) const { for (auto &it : users_) { updates.push_back(td_api::make_object(get_user_object(it.first, &it.second))); diff --git a/td/telegram/ContactsManager.h b/td/telegram/ContactsManager.h index 52dd11320..4f4c0a648 100644 --- a/td/telegram/ContactsManager.h +++ b/td/telegram/ContactsManager.h @@ -443,6 +443,8 @@ class ContactsManager : public Actor { UserId get_support_user(Promise &&promise); + void after_get_difference(); + void get_current_state(vector> &updates) const; private: diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index c5e90ad25..2efe3ff89 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -6551,9 +6551,6 @@ void MessagesManager::after_get_difference() { load_notification_settings(); - // TODO move to ContactsManager or delete after users will become persistent - td_->contacts_manager_->get_user(td_->contacts_manager_->get_my_id(), 3, Promise()); - // TODO resend some messages } diff --git a/td/telegram/UpdatesManager.cpp b/td/telegram/UpdatesManager.cpp index b1cec649f..3e9617554 100644 --- a/td/telegram/UpdatesManager.cpp +++ b/td/telegram/UpdatesManager.cpp @@ -1093,6 +1093,7 @@ void UpdatesManager::after_get_difference() { state_ = saved_state; td_->animations_manager_->after_get_difference(); + td_->contacts_manager_->after_get_difference(); td_->inline_queries_manager_->after_get_difference(); td_->messages_manager_->after_get_difference(); td_->stickers_manager_->after_get_difference();