Really fix Verify and Confirm for phone number.
GitOrigin-RevId: 1f859c039bdf5a554efa4d328848fafa36c659d4
This commit is contained in:
parent
0d2df39a2e
commit
ebf9f45eeb
@ -56,7 +56,7 @@ void PhoneNumberManager::set_phone_number(uint64 query_id, string phone_number,
|
||||
case Type::ChangePhone:
|
||||
return process_send_code_result(query_id, send_code_helper_.send_change_phone_code(phone_number, settings));
|
||||
case Type::VerifyPhone:
|
||||
return process_send_code_result(query_id, send_code_helper_.send_confirm_phone_code(phone_number, settings));
|
||||
return process_send_code_result(query_id, send_code_helper_.send_verify_phone_code(phone_number, settings));
|
||||
case Type::ConfirmPhone:
|
||||
default:
|
||||
UNREACHABLE();
|
||||
@ -74,7 +74,8 @@ void PhoneNumberManager::set_phone_number_and_hash(uint64 query_id, string hash,
|
||||
|
||||
switch (type_) {
|
||||
case Type::ConfirmPhone:
|
||||
return process_send_code_result(query_id, send_code_helper_.send_verify_phone_code(hash, phone_number, settings));
|
||||
return process_send_code_result(query_id,
|
||||
send_code_helper_.send_confirm_phone_code(hash, phone_number, settings));
|
||||
case Type::ChangePhone:
|
||||
case Type::VerifyPhone:
|
||||
default:
|
||||
|
@ -71,17 +71,17 @@ Result<telegram_api::account_sendChangePhoneCode> SendCodeHelper::send_change_ph
|
||||
return telegram_api::account_sendChangePhoneCode(phone_number_, get_input_code_settings(settings));
|
||||
}
|
||||
|
||||
Result<telegram_api::account_sendVerifyPhoneCode> SendCodeHelper::send_verify_phone_code(const string &hash,
|
||||
Slice phone_number,
|
||||
Result<telegram_api::account_sendVerifyPhoneCode> SendCodeHelper::send_verify_phone_code(Slice phone_number,
|
||||
const Settings &settings) {
|
||||
phone_number_ = phone_number.str();
|
||||
return telegram_api::account_sendVerifyPhoneCode(hash, get_input_code_settings(settings));
|
||||
return telegram_api::account_sendVerifyPhoneCode(phone_number_, get_input_code_settings(settings));
|
||||
}
|
||||
|
||||
Result<telegram_api::account_sendConfirmPhoneCode> SendCodeHelper::send_confirm_phone_code(Slice phone_number,
|
||||
Result<telegram_api::account_sendConfirmPhoneCode> SendCodeHelper::send_confirm_phone_code(const string &hash,
|
||||
Slice phone_number,
|
||||
const Settings &settings) {
|
||||
phone_number_ = phone_number.str();
|
||||
return telegram_api::account_sendConfirmPhoneCode(phone_number_, get_input_code_settings(settings));
|
||||
return telegram_api::account_sendConfirmPhoneCode(hash, get_input_code_settings(settings));
|
||||
}
|
||||
|
||||
SendCodeHelper::AuthenticationCodeInfo SendCodeHelper::get_authentication_code_info(
|
||||
|
@ -31,10 +31,10 @@ class SendCodeHelper {
|
||||
Result<telegram_api::account_sendChangePhoneCode> send_change_phone_code(Slice phone_number,
|
||||
const Settings &settings);
|
||||
|
||||
Result<telegram_api::account_sendVerifyPhoneCode> send_verify_phone_code(const string &hash, Slice phone_number,
|
||||
Result<telegram_api::account_sendVerifyPhoneCode> send_verify_phone_code(Slice phone_number,
|
||||
const Settings &settings);
|
||||
|
||||
Result<telegram_api::account_sendConfirmPhoneCode> send_confirm_phone_code(Slice phone_number,
|
||||
Result<telegram_api::account_sendConfirmPhoneCode> send_confirm_phone_code(const string &hash, Slice phone_number,
|
||||
const Settings &settings);
|
||||
|
||||
Slice phone_number() const {
|
||||
|
Loading…
Reference in New Issue
Block a user