diff --git a/td/telegram/AuthManager.cpp b/td/telegram/AuthManager.cpp index ec2d6a184..7c2499a77 100644 --- a/td/telegram/AuthManager.cpp +++ b/td/telegram/AuthManager.cpp @@ -615,7 +615,6 @@ void AuthManager::on_get_password_result(NetQueryPtr &result) { if (password->get_id() == telegram_api::account_noPassword::ID) { auto no_password = move_tl_object_as(password); new_salt_ = no_password->new_salt_.as_slice().str(); - email_address_unconfirmed_pattern_ = no_password->email_unconfirmed_pattern_; } else { CHECK(password->get_id() == telegram_api::account_password::ID); auto password_info = move_tl_object_as(password); @@ -623,7 +622,6 @@ void AuthManager::on_get_password_result(NetQueryPtr &result) { new_salt_ = password_info->new_salt_.as_slice().str(); hint_ = password_info->hint_; has_recovery_ = password_info->has_recovery_; - email_address_unconfirmed_pattern_ = password_info->email_unconfirmed_pattern_; } update_state(State::WaitPassword); on_query_ok(); @@ -637,6 +635,7 @@ void AuthManager::on_request_password_recovery_result(NetQueryPtr &result) { auto email_address_pattern = r_email_address_pattern.move_as_ok(); CHECK(email_address_pattern->get_id() == telegram_api::auth_passwordRecovery::ID); email_address_pattern_ = email_address_pattern->email_pattern_; + update_state(State::WaitPassword, true); on_query_ok(); } diff --git a/td/telegram/AuthManager.h b/td/telegram/AuthManager.h index b8315f6f9..dfbeb7b7e 100644 --- a/td/telegram/AuthManager.h +++ b/td/telegram/AuthManager.h @@ -160,7 +160,6 @@ class AuthManager : public NetActor { string new_salt_; string hint_; bool has_recovery_; - string email_address_unconfirmed_pattern_; string email_address_pattern_; bool was_check_bot_token_ = false;