From 2cdb35d2fb99c8e5069ce7513d41464ba7138dff Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 6 Jan 2023 12:53:24 +0300 Subject: [PATCH] Support auth.sentCodeSuccess. --- td/telegram/AuthManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/td/telegram/AuthManager.cpp b/td/telegram/AuthManager.cpp index e91fd9a36..b78cb42b6 100644 --- a/td/telegram/AuthManager.cpp +++ b/td/telegram/AuthManager.cpp @@ -559,7 +559,8 @@ void AuthManager::on_sent_code(telegram_api::object_ptrget_id(); if (sent_code_id != telegram_api::auth_sentCode::ID) { CHECK(sent_code_id == telegram_api::auth_sentCodeSuccess::ID); - return on_query_error(Status::Error(500, "Receive unsupported response")); + auto sent_code_success = move_tl_object_as(sent_code_ptr); + return on_get_authorization(std::move(sent_code_success->authorization_)); } auto sent_code = telegram_api::move_object_as(sent_code_ptr); auto code_type_id = sent_code->type_->get_id();