From 62d4e339de537a9c7d9865b56a70d62ef0eca920 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 31 Dec 2021 16:33:46 +0300 Subject: [PATCH] Fix ContactsManager::get_user with min-user for bots. --- td/telegram/ContactsManager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 8c2f2f9d4..0abfebb69 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -13976,8 +13976,7 @@ bool ContactsManager::get_user(UserId user_id, int left_tries, Promise &&p get_user_force(user_id); } - // TODO support loading user from database and merging it with min-user in memory - if (!have_min_user(user_id)) { + if (!have_min_user(user_id) || td_->auth_manager_->is_bot()) { // TODO UserLoader if (left_tries > 2 && G()->parameters().use_chat_info_db) { send_closure_later(actor_id(this), &ContactsManager::load_user_from_database, nullptr, user_id,