diff --git a/td/telegram/AuthManager.cpp b/td/telegram/AuthManager.cpp index b78cb42b6..11da52e4d 100644 --- a/td/telegram/AuthManager.cpp +++ b/td/telegram/AuthManager.cpp @@ -960,12 +960,16 @@ void AuthManager::on_get_authorization(tl_object_ptrflags_ & telegram_api::auth_authorization::TMP_SESSIONS_MASK) != 0) { + if (auth->tmp_sessions_ > 0) { td_->option_manager_->set_option_integer("session_count", auth->tmp_sessions_); } if (auth->setup_password_required_ && auth->otherwise_relogin_days_ > 0) { td_->option_manager_->set_option_integer("otherwise_relogin_days", auth->otherwise_relogin_days_); } + if (!auth->future_auth_token_.empty()) { + td_->option_manager_->set_option_string("authentication_token", + base64url_encode(auth->future_auth_token_.as_slice())); + } td_->attach_menu_manager_->init(); td_->messages_manager_->on_authorization_success(); td_->notification_manager_->init();