Allow auth.bindTempAuthKey before authorization to check auth_key validness.

GitOrigin-RevId: 7a80d84aef6a9f097c6567ed72bccd9b62f87c2c
This commit is contained in:
levlam 2020-11-01 21:42:48 +03:00
parent 3a8931cff0
commit 69ae1d4f0c

View File

@ -63,7 +63,8 @@ NetQueryPtr NetQueryCreator::create(uint64 id, const telegram_api::Function &fun
total_timeout_limit = 8;
}
if ((auth_manager == nullptr || !auth_manager->was_authorized()) && auth_flag == NetQuery::AuthFlag::On &&
tl_constructor != telegram_api::auth_exportAuthorization::ID) {
tl_constructor != telegram_api::auth_exportAuthorization::ID &&
tl_constructor != telegram_api::auth_bindTempAuthKey::ID) {
LOG(ERROR) << "Send query before authorization: " << to_string(function);
}
}