mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-06 17:35:36 +00:00
Explain registration from mobiles only.
This commit is contained in:
@@ -397,17 +397,18 @@ void CodeWidget::submit() {
|
||||
}
|
||||
|
||||
void CodeWidget::noTelegramCode() {
|
||||
if (_noTelegramCodeRequestId) {
|
||||
return;
|
||||
}
|
||||
_noTelegramCodeRequestId = api().request(MTPauth_ResendCode(
|
||||
MTP_string(getData()->phone),
|
||||
MTP_bytes(getData()->phoneHash)
|
||||
)).done([=](const MTPauth_SentCode &result) {
|
||||
noTelegramCodeDone(result);
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
noTelegramCodeFail(error);
|
||||
}).handleFloodErrors().send();
|
||||
Ui::show(Box<InformBox>(tr::lng_code_register_phone(tr::now)));
|
||||
//if (_noTelegramCodeRequestId) {
|
||||
// return;
|
||||
//}
|
||||
//_noTelegramCodeRequestId = api().request(MTPauth_ResendCode(
|
||||
// MTP_string(getData()->phone),
|
||||
// MTP_bytes(getData()->phoneHash)
|
||||
//)).done([=](const MTPauth_SentCode &result) {
|
||||
// noTelegramCodeDone(result);
|
||||
//}).fail([=](const MTP::Error &error) {
|
||||
// noTelegramCodeFail(error);
|
||||
//}).handleFloodErrors().send();
|
||||
}
|
||||
|
||||
void CodeWidget::noTelegramCodeDone(const MTPauth_SentCode &result) {
|
||||
|
Reference in New Issue
Block a user