Trying to not send GetUsersQuery while closing.

GitOrigin-RevId: 75e44b200ec12becb82284607bba44b6d2d05fd8
This commit is contained in:
levlam 2019-04-28 01:30:55 +03:00
parent 4e632186b5
commit 654010d8f4

View File

@ -6251,7 +6251,7 @@ void ContactsManager::update_user(User *u, UserId user_id, bool from_binlog, boo
save_user(u, user_id, from_binlog);
}
if (!u->is_received && u->access_hash != -1 && !u->is_repaired) {
if (!u->is_received && u->access_hash != -1 && !u->is_repaired && !G()->close_flag()) {
u->is_repaired = true;
auto input_user = get_input_user(user_id);
CHECK(input_user != nullptr);
@ -7141,6 +7141,10 @@ void ContactsManager::on_delete_profile_photo(int64 profile_photo_id, Promise<Un
user_full->photos_offset = -1;
}
if (G()->close_flag()) {
return promise.set_value(Unit());
}
auto input_user = get_input_user(my_id);
CHECK(input_user != nullptr);
vector<tl_object_ptr<telegram_api::InputUser>> users;