Fix login link URL.

GitOrigin-RevId: 064e31b5b095db03ccd7cb9cb3b4e1fabc92aba0
This commit is contained in:
levlam 2019-12-31 16:20:29 +03:00
parent 395a96a764
commit 3d574e39c3
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ tl_object_ptr<td_api::AuthorizationState> AuthManager::get_authorization_state_o
case State::WaitCode:
return send_code_helper_.get_authorization_state_wait_code();
case State::WaitQrCodeConfirmation:
return make_tl_object<td_api::authorizationStateWaitOtherDeviceConfirmation>("tg://login?" +
return make_tl_object<td_api::authorizationStateWaitOtherDeviceConfirmation>("tg://login?token=" +
base64url_encode(login_token_));
case State::WaitPassword:
return make_tl_object<td_api::authorizationStateWaitPassword>(

View File

@ -4141,7 +4141,7 @@ void ContactsManager::get_account_ttl(Promise<int32> &&promise) const {
void ContactsManager::confirm_qr_code_authentication(string link,
Promise<td_api::object_ptr<td_api::session>> &&promise) {
Slice prefix("tg://login?");
Slice prefix("tg://login?token=");
if (!begins_with(to_lower(link), prefix)) {
return promise.set_error(Status::Error(400, "AUTH_TOKEN_INVALID"));
}