Skip to content

Commit e9808c1

Browse files
authored
Merge pull request #2191 from dallo28/fix/login-email-not-allowed
Show localized EmailNotAllowed error on the email code and 2FA email screens
2 parents 977c1d0 + c185e26 commit e9808c1

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6941,6 +6941,8 @@ public void onNextPressed(String code) {
69416941
} else if (error.text.contains("CODE_EMPTY") || error.text.contains("CODE_INVALID") || error.text.contains("EMAIL_CODE_INVALID") || error.text.contains("PHONE_CODE_INVALID")) {
69426942
shakeWrongCode();
69436943
isWrongCode = true;
6944+
} else if (error.text.contains("EMAIL_NOT_ALLOWED")) {
6945+
needShowAlert(getString(R.string.RestorePasswordNoEmailTitle), getString(R.string.EmailNotAllowed));
69446946
} else if (error.text.contains("EMAIL_TOKEN_INVALID")) {
69456947
needShowAlert(getString(R.string.RestorePasswordNoEmailTitle), getString(R.string.EmailTokenInvalid));
69466948
} else if (error.text.contains("EMAIL_VERIFY_EXPIRED")) {

‎TMessagesProj/src/main/java/org/telegram/ui/TwoStepVerificationSetupActivity.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,6 +1996,8 @@ private void setNewPassword(final boolean clear) {
19961996
} else {
19971997
if ("EMAIL_INVALID".equals(error.text)) {
19981998
showAlertWithText(LocaleController.getString(R.string.AppName), LocaleController.getString(R.string.PasswordEmailInvalid));
1999+
} else if ("EMAIL_NOT_ALLOWED".equals(error.text)) {
2000+
showAlertWithText(LocaleController.getString(R.string.AppName), LocaleController.getString(R.string.EmailNotAllowed));
19992001
} else if (error.text.startsWith("FLOOD_WAIT")) {
20002002
int time = Utilities.parseInt(error.text);
20012003
String timeString;

0 commit comments

Comments
 (0)