mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Fix process_updates=True preventing new sessions from signing in
This commit is contained in:
parent
58fe39f060
commit
940dfe6816
|
@ -967,7 +967,11 @@ class TelegramClient(TelegramBareClient):
|
|||
called automatically on connection if self.updates.enabled = True,
|
||||
otherwise it should be called manually after enabling updates.
|
||||
"""
|
||||
self.updates.process(self(GetStateRequest()))
|
||||
try:
|
||||
self.updates.process(self(GetStateRequest()))
|
||||
return True
|
||||
except UnauthorizedError:
|
||||
return False
|
||||
|
||||
def add_update_handler(self, handler):
|
||||
"""Adds an update handler (a function which takes a TLObject,
|
||||
|
|
Loading…
Reference in New Issue
Block a user