2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-04 16:35:44 +00:00

Use getters in MTP classes.

This commit is contained in:
John Preston
2019-07-05 15:38:38 +02:00
parent 3ca28c0cf9
commit 567bf60644
100 changed files with 2807 additions and 2672 deletions

View File

@@ -136,11 +136,11 @@ void PwdCheckWidget::pwdSubmitDone(bool recover, const MTPauth_Authorization &re
cSetPasswordRecovered(true);
}
auto &d = result.c_auth_authorization();
if (d.vuser.type() != mtpc_user || !d.vuser.c_user().is_self()) { // wtf?
if (d.vuser().type() != mtpc_user || !d.vuser().c_user().is_self()) { // wtf?
showError(rpl::single(Lang::Hard::ServerError()));
return;
}
finish(d.vuser);
finish(d.vuser());
}
void PwdCheckWidget::pwdSubmitFail(const RPCError &error) {
@@ -265,7 +265,7 @@ void PwdCheckWidget::codeSubmitFail(const RPCError &error) {
}
void PwdCheckWidget::recoverStarted(const MTPauth_PasswordRecovery &result) {
_emailPattern = qs(result.c_auth_passwordRecovery().vemail_pattern);
_emailPattern = qs(result.c_auth_passwordRecovery().vemail_pattern());
updateDescriptionText();
}