Add additional check for is_bot before sending terms of service request.

GitOrigin-RevId: 975ece32f0a7f31cd1b0021b414cc7cf17b907bf
This commit is contained in:
levlam 2019-04-18 18:18:20 +03:00
parent 6b214aa72e
commit 2ee75b769c

View File

@ -3031,7 +3031,7 @@ void Td::on_alarm_timeout(int64 alarm_id) {
return;
}
if (alarm_id == TERMS_OF_SERVICE_ALARM_ID) {
if (!close_flag_) {
if (!close_flag_ && !auth_manager_->is_bot()) {
get_terms_of_service(
this, PromiseCreator::lambda([actor_id = actor_id(this)](Result<std::pair<int32, TermsOfService>> result) {
send_closure(actor_id, &Td::on_get_terms_of_service, std::move(result), false);