mirror of
https://github.com/PaiGramTeam/telegram-bot-api.git
synced 2024-11-16 12:51:24 +00:00
Make bots online while logging in.
This commit is contained in:
parent
21cc85064c
commit
aa70087df4
@ -4047,6 +4047,8 @@ void Client::on_update_authorization_state() {
|
||||
case td_api::authorizationStateWaitEncryptionKey::ID:
|
||||
return send_request(make_object<td_api::checkDatabaseEncryptionKey>(), std::make_unique<TdOnInitCallback>(this));
|
||||
case td_api::authorizationStateWaitPhoneNumber::ID:
|
||||
send_request(make_object<td_api::setOption>("online", make_object<td_api::optionValueBoolean>(true)),
|
||||
std::make_unique<TdOnOkCallback>());
|
||||
return send_request(make_object<td_api::checkAuthenticationBotToken>(bot_token_),
|
||||
std::make_unique<TdOnAuthorizationCallback>(this));
|
||||
case td_api::authorizationStateReady::ID: {
|
||||
|
Loading…
Reference in New Issue
Block a user