Improve SetBotInfoQuery.

This commit is contained in:
levlam 2023-04-07 01:15:16 +03:00
parent 9b089bc194
commit 6fde8184af

View File

@ -662,7 +662,12 @@ class SetBotInfoQuery final : public Td::ResultHandler {
td_->contacts_manager_->reload_user(bot_user_id_, std::move(promise_));
} else {
invalidate_bot_info();
promise_.set_value(Unit());
if (td_->auth_manager_->is_bot()) {
// invalidation is enough for bots
promise_.set_value(Unit());
} else {
td_->contacts_manager_->reload_user_full(bot_user_id_, std::move(promise_));
}
}
}