Add passwordState.login_email_address_pattern.
This commit is contained in:
parent
14a9fda4ef
commit
cac1f4cd14
@ -144,8 +144,9 @@ authorizationStateClosed = AuthorizationState;
|
||||
//@description Represents the current state of 2-step verification @has_password True, if a 2-step verification password is set @password_hint Hint for the password; may be empty
|
||||
//@has_recovery_email_address True, if a recovery email is set @has_passport_data True, if some Telegram Passport elements were saved
|
||||
//@recovery_email_address_code_info Information about the recovery email address to which the confirmation email was sent; may be null
|
||||
//@login_email_address_pattern Pattern of the email address set up for logging in
|
||||
//@pending_reset_date If not 0, point in time (Unix timestamp) after which the 2-step verification password can be reset immediately using resetPassword
|
||||
passwordState has_password:Bool password_hint:string has_recovery_email_address:Bool has_passport_data:Bool recovery_email_address_code_info:emailAddressAuthenticationCodeInfo pending_reset_date:int32 = PasswordState;
|
||||
passwordState has_password:Bool password_hint:string has_recovery_email_address:Bool has_passport_data:Bool recovery_email_address_code_info:emailAddressAuthenticationCodeInfo login_email_address_pattern:string pending_reset_date:int32 = PasswordState;
|
||||
|
||||
//@description Contains information about the current recovery email address @recovery_email_address Recovery email address
|
||||
recoveryEmailAddress recovery_email_address:string = RecoveryEmailAddress;
|
||||
|
@ -786,6 +786,7 @@ void PasswordManager::do_get_state(Promise<PasswordState> promise) {
|
||||
send_closure(actor_id, &PasswordManager::drop_cached_secret);
|
||||
}
|
||||
state.unconfirmed_recovery_email_code = {std::move(password->email_unconfirmed_pattern_), code_length};
|
||||
state.login_email_pattern = std::move(password->login_email_pattern_);
|
||||
|
||||
if (password->flags_ & telegram_api::account_password::PENDING_RESET_DATE_MASK) {
|
||||
state.pending_reset_date = td::max(password->pending_reset_date_, 0);
|
||||
|
@ -106,6 +106,7 @@ class PasswordManager final : public NetQueryCallback {
|
||||
bool has_recovery_email_address = false;
|
||||
bool has_secure_values = false;
|
||||
SentEmailCode unconfirmed_recovery_email_code;
|
||||
string login_email_pattern;
|
||||
int32 pending_reset_date = 0;
|
||||
|
||||
string current_client_salt;
|
||||
@ -120,7 +121,8 @@ class PasswordManager final : public NetQueryCallback {
|
||||
State get_password_state_object() const {
|
||||
return td_api::make_object<td_api::passwordState>(
|
||||
has_password, password_hint, has_recovery_email_address, has_secure_values,
|
||||
unconfirmed_recovery_email_code.get_email_address_authentication_code_info_object(), pending_reset_date);
|
||||
unconfirmed_recovery_email_code.get_email_address_authentication_code_info_object(), login_email_pattern,
|
||||
pending_reset_date);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user