Fix secret chats test.

GitOrigin-RevId: b8c4dca1b8937a8b07ce6fdd625b5a8f55284979
This commit is contained in:
levlam 2020-04-08 02:27:53 +03:00
parent f42a955d75
commit 301ff466e1

View File

@ -55,8 +55,14 @@ NetQueryPtr NetQueryCreator::create(uint64 id, const telegram_api::Function &fun
} }
double total_timeout_limit = 60; double total_timeout_limit = 60;
if (!G()->close_flag() && G()->td().get_actor_unsafe()->auth_manager_->is_bot()) { if (!G()->close_flag()) {
total_timeout_limit = 8; auto td = G()->td();
if (!td.empty()) {
auto auth_manager = td.get_actor_unsafe()->auth_manager_.get();
if (auth_manager && auth_manager->is_bot()) {
total_timeout_limit = 8;
}
}
} }
auto query = object_pool_.create(NetQuery::State::Query, id, std::move(slice), BufferSlice(), dc_id, type, auth_flag, auto query = object_pool_.create(NetQuery::State::Query, id, std::move(slice), BufferSlice(), dc_id, type, auth_flag,
gzip_flag, tl_constructor, total_timeout_limit); gzip_flag, tl_constructor, total_timeout_limit);