Better check for is_bot.
GitOrigin-RevId: a4dc6b4b2a38eb3474b2265af32b56f8500818df
This commit is contained in:
parent
c25a346f54
commit
123361b26a
@ -79,6 +79,9 @@ void AuthManager::tear_down() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool AuthManager::is_bot() const {
|
bool AuthManager::is_bot() const {
|
||||||
|
if (net_query_id_ != 0 && net_query_type_ == NetQueryType::BotAuthentication) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return is_bot_ && (state_ == State::Ok || state_ == State::LoggingOut || state_ == State::DestroyingKeys ||
|
return is_bot_ && (state_ == State::Ok || state_ == State::LoggingOut || state_ == State::DestroyingKeys ||
|
||||||
state_ == State::Closing);
|
state_ == State::Closing);
|
||||||
}
|
}
|
||||||
|
@ -3338,7 +3338,7 @@ void Td::on_alarm_timeout(int64 alarm_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Td::on_online_updated(bool force, bool send_update) {
|
void Td::on_online_updated(bool force, bool send_update) {
|
||||||
if (close_flag_ >= 2 || auth_manager_->is_bot() || !auth_manager_->is_authorized()) {
|
if (close_flag_ >= 2 || !auth_manager_->is_authorized() || auth_manager_->is_bot()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (force || is_online_) {
|
if (force || is_online_) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user