2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Confirm 2sv recovery email by code.

This commit is contained in:
John Preston
2018-11-07 13:39:31 +04:00
parent 93678a07a8
commit be3e43e6cb
15 changed files with 441 additions and 108 deletions

View File

@@ -5038,16 +5038,7 @@ void ApiWrap::reloadPasswordState() {
}
void ApiWrap::clearUnconfirmedPassword() {
_passwordRequestId = request(MTPaccount_UpdatePasswordSettings(
MTP_inputCheckPasswordEmpty(),
MTP_account_passwordInputSettings(
MTP_flags(
MTPDaccount_passwordInputSettings::Flag::f_email),
MTP_passwordKdfAlgoUnknown(), // new_algo
MTP_bytes(QByteArray()), // new_password_hash
MTP_string(QString()), // hint
MTP_string(QString()), // email
MTPSecureSecretSettings())
_passwordRequestId = request(MTPaccount_CancelPasswordEmail(
)).done([=](const MTPBool &result) {
_passwordRequestId = 0;
reloadPasswordState();