mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-11-22 16:56:16 +00:00
Added some more debugging to UserManager.
This commit is contained in:
parent
77bfcfb849
commit
627cef0ae2
@ -31,6 +31,9 @@ import java.security.NoSuchAlgorithmException;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
public class UserManager {
|
public class UserManager {
|
||||||
public TLUser user = null;
|
public TLUser user = null;
|
||||||
public String phone = null;
|
public String phone = null;
|
||||||
@ -39,14 +42,17 @@ public class UserManager {
|
|||||||
private TLSentCode sent_code = null;
|
private TLSentCode sent_code = null;
|
||||||
private TLAuthorization auth = null;
|
private TLAuthorization auth = null;
|
||||||
private boolean password_needed = false;
|
private boolean password_needed = false;
|
||||||
|
private static Logger logger = LoggerFactory.getLogger(UserManager.class);
|
||||||
|
|
||||||
public UserManager(TelegramClient c) throws IOException {
|
public UserManager(TelegramClient c) throws IOException {
|
||||||
this.client = c;
|
this.client = c;
|
||||||
|
logger.debug("Calling getFullUser");
|
||||||
try {
|
try {
|
||||||
TLUserFull full_user = this.client.usersGetFullUser(new TLInputUserSelf());
|
TLUserFull full_user = this.client.usersGetFullUser(new TLInputUserSelf());
|
||||||
this.user = full_user.getUser().getAsUser();
|
this.user = full_user.getUser().getAsUser();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// This may happen. Ignoring it.
|
// This may happen. Ignoring it.
|
||||||
|
logger.debug("Ignoring exception", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user