From 269047d133f4dc1d38093963f687abcc85b60738 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 30 Apr 2020 00:54:43 +0300 Subject: [PATCH] Remove AuthManager::set_is_bot. GitOrigin-RevId: b56180dda8aab189c0cb3a3d2f5624e4a5307366 --- td/telegram/AuthManager.cpp | 8 -------- td/telegram/AuthManager.h | 1 - td/telegram/ContactsManager.cpp | 1 - 3 files changed, 10 deletions(-) diff --git a/td/telegram/AuthManager.cpp b/td/telegram/AuthManager.cpp index 5cde2cf2f..b4e569b45 100644 --- a/td/telegram/AuthManager.cpp +++ b/td/telegram/AuthManager.cpp @@ -87,14 +87,6 @@ bool AuthManager::is_bot() const { state_ == State::Closing); } -void AuthManager::set_is_bot(bool is_bot) { - if (!is_bot_ && is_bot && api_id_ == 23818) { - LOG(ERROR) << "Fix is_bot to " << is_bot; - G()->td_db()->get_binlog_pmc()->set("auth_is_bot", "true"); - is_bot_ = true; - } -} - bool AuthManager::is_authorized() const { return state_ == State::Ok; } diff --git a/td/telegram/AuthManager.h b/td/telegram/AuthManager.h index f8cf5c3ef..7b3b62e88 100644 --- a/td/telegram/AuthManager.h +++ b/td/telegram/AuthManager.h @@ -28,7 +28,6 @@ class AuthManager : public NetActor { AuthManager(int32 api_id, const string &api_hash, ActorShared<> parent); bool is_bot() const; - void set_is_bot(bool is_bot); bool is_authorized() const; void get_state(uint64 query_id); diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 2f0b8dc75..c050b44f6 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -6900,7 +6900,6 @@ void ContactsManager::on_get_user(tl_object_ptr &&user_ptr, bool is_bot = (flags & USER_FLAG_IS_BOT) != 0; if (flags & USER_FLAG_IS_ME) { set_my_id(user_id); - td_->auth_manager_->set_is_bot(is_bot); if (!is_bot) { G()->shared_config().set_option_string("my_phone_number", user->phone_); }