mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 05:19:41 +00:00
Don't set self._state when checking if logged in
This essentially made catch_up useless after .start(). cc #1125 since this affects catch_up.
This commit is contained in:
@@ -141,7 +141,8 @@ class UserMethods(TelegramBaseClient):
|
|||||||
"""
|
"""
|
||||||
if self._authorized is None:
|
if self._authorized is None:
|
||||||
try:
|
try:
|
||||||
self._state = await self(functions.updates.GetStateRequest())
|
# Any request that requires authorization will work
|
||||||
|
await self(functions.updates.GetStateRequest())
|
||||||
self._authorized = True
|
self._authorized = True
|
||||||
except errors.RPCError:
|
except errors.RPCError:
|
||||||
self._authorized = False
|
self._authorized = False
|
||||||
|
Reference in New Issue
Block a user