mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-10 08:02:23 +03:00
Change _set_connected_and_authorized condition
This commit is contained in:
parent
1a0d5e75bf
commit
30ac6789ce
|
@ -209,12 +209,14 @@ class TelegramBareClient:
|
|||
# another data center and this would raise UserMigrateError)
|
||||
# to also assert whether the user is logged in or not.
|
||||
self._user_connected = True
|
||||
if _sync_updates and not _cdn and not self._authorized:
|
||||
if self._authorized is None and _sync_updates and not _cdn:
|
||||
try:
|
||||
await self.sync_updates()
|
||||
self._set_connected_and_authorized()
|
||||
except UnauthorizedError:
|
||||
pass
|
||||
self._authorized = False
|
||||
elif self._authorized:
|
||||
self._set_connected_and_authorized()
|
||||
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user