Fixed the login process when two-factor authorization is used.

This commit is contained in:
Fabian Schlenz 2016-07-26 05:59:58 +02:00
parent 458894a8bf
commit 24f8320a42
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ public class UserManager {
this.auth = client.authSignIn(phone, this.sent_code.getPhoneCodeHash(), this.code);
this.user = auth.getUser().getAsUser();
} catch (RpcErrorException e) {
if (!e.getTag().equals("401: SESSION_PASSWORD_NEEDED")) throw e;
if (e.getCode()!=401 || !e.getTag().equals("SESSION_PASSWORD_NEEDED")) throw e;
this.password_needed = true;
}
}