MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / VerifyLoginEmail

Function VerifyLoginEmail

Telegram/SourceFiles/api/api_cloud_password.cpp:562–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560}
561
562void VerifyLoginEmail(
563 MTP::Sender &api,
564 const QString &code,
565 Fn<void()> done,
566 Fn<void(const QString &error)> fail) {
567 api.request(MTPaccount_VerifyEmail(
568 MTP_emailVerifyPurposeLoginChange(),
569 MTP_emailVerificationCode(MTP_string(code))
570 )).done([=](const MTPaccount_EmailVerified &result) {
571 result.match([=](const MTPDaccount_emailVerified &data) {
572 done();
573 }, [=](const MTPDaccount_emailVerifiedLogin &data) {
574 fail(QString());
575 });
576 }).fail([=](const MTP::Error &error) {
577 fail(error.type());
578 }).send();
579}
580
581} // namespace Api

Callers 2

verifyCodeMethod · 0.85
setupContentMethod · 0.85

Calls 7

MTP_stringFunction · 0.85
QStringClass · 0.50
sendMethod · 0.45
failMethod · 0.45
doneMethod · 0.45
requestMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected