1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2024-11-22 16:56:16 +00:00

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

View File

@ -69,7 +69,7 @@ public class UserManager {
this.auth = client.authSignIn(phone, this.sent_code.getPhoneCodeHash(), this.code); this.auth = client.authSignIn(phone, this.sent_code.getPhoneCodeHash(), this.code);
this.user = auth.getUser().getAsUser(); this.user = auth.getUser().getAsUser();
} catch (RpcErrorException e) { } 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; this.password_needed = true;
} }
} }