Stable check in is_bot.

GitOrigin-RevId: d119b007e91dcd9a33179a3f32727b998825a97e
This commit is contained in:
levlam 2019-12-30 03:21:46 +03:00
parent 05a99dedb1
commit d810f11e2e

View File

@ -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) {