From d810f11e2ed67098585e03762c8d8423e3542828 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 30 Dec 2019 03:21:46 +0300 Subject: [PATCH] Stable check in is_bot. GitOrigin-RevId: d119b007e91dcd9a33179a3f32727b998825a97e --- td/telegram/AuthManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/td/telegram/AuthManager.cpp b/td/telegram/AuthManager.cpp index 854affb59..dd273f160 100644 --- a/td/telegram/AuthManager.cpp +++ b/td/telegram/AuthManager.cpp @@ -453,7 +453,8 @@ void AuthManager::tear_down() { } bool AuthManager::is_bot() const { - return is_authorized() && is_bot_; + return is_bot_ && (state_ == State::Ok || state_ == State::LoggingOut || state_ == State::DestroyingKeys || + state_ == State::Closing); } void AuthManager::set_is_bot(bool is_bot) {