Remove AuthManager::set_is_bot.

GitOrigin-RevId: b56180dda8aab189c0cb3a3d2f5624e4a5307366
This commit is contained in:
levlam 2020-04-30 00:54:43 +03:00
parent a40bdeca4c
commit 269047d133
3 changed files with 0 additions and 10 deletions

View File

@ -87,14 +87,6 @@ bool AuthManager::is_bot() const {
state_ == State::Closing); 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 { bool AuthManager::is_authorized() const {
return state_ == State::Ok; return state_ == State::Ok;
} }

View File

@ -28,7 +28,6 @@ class AuthManager : public NetActor {
AuthManager(int32 api_id, const string &api_hash, ActorShared<> parent); AuthManager(int32 api_id, const string &api_hash, ActorShared<> parent);
bool is_bot() const; bool is_bot() const;
void set_is_bot(bool is_bot);
bool is_authorized() const; bool is_authorized() const;
void get_state(uint64 query_id); void get_state(uint64 query_id);

View File

@ -6900,7 +6900,6 @@ void ContactsManager::on_get_user(tl_object_ptr<telegram_api::User> &&user_ptr,
bool is_bot = (flags & USER_FLAG_IS_BOT) != 0; bool is_bot = (flags & USER_FLAG_IS_BOT) != 0;
if (flags & USER_FLAG_IS_ME) { if (flags & USER_FLAG_IS_ME) {
set_my_id(user_id); set_my_id(user_id);
td_->auth_manager_->set_is_bot(is_bot);
if (!is_bot) { if (!is_bot) {
G()->shared_config().set_option_string("my_phone_number", user->phone_); G()->shared_config().set_option_string("my_phone_number", user->phone_);
} }