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:
Lonami Exo 2019-03-11 09:04:08 +01:00
parent 8884015dae
commit 1b703e905c

View File

@ -141,7 +141,8 @@ class UserMethods(TelegramBaseClient):
"""
if self._authorized is None:
try:
self._state = await self(functions.updates.GetStateRequest())
# Any request that requires authorization will work
await self(functions.updates.GetStateRequest())
self._authorized = True
except errors.RPCError:
self._authorized = False