Add missing await keyword for ._check_events_pending_resolve

This commit is contained in:
Lonami Exo 2018-03-03 22:54:38 +01:00
parent 563d731c95
commit d5c5c3cff1

View File

@ -288,7 +288,7 @@ class TelegramClient(TelegramBareClient):
await self.connect() await self.connect()
if self.is_user_authorized(): if self.is_user_authorized():
self._check_events_pending_resolve() await self._check_events_pending_resolve()
return self return self
if bot_token: if bot_token:
@ -345,7 +345,7 @@ class TelegramClient(TelegramBareClient):
# We won't reach here if any step failed (exit by exception) # We won't reach here if any step failed (exit by exception)
print('Signed in successfully as', utils.get_display_name(me)) print('Signed in successfully as', utils.get_display_name(me))
self._check_events_pending_resolve() await self._check_events_pending_resolve()
return self return self
async def sign_in(self, phone=None, code=None, async def sign_in(self, phone=None, code=None,
@ -380,7 +380,7 @@ class TelegramClient(TelegramBareClient):
:meth:`.send_code_request()`. :meth:`.send_code_request()`.
""" """
if self.is_user_authorized(): if self.is_user_authorized():
self._check_events_pending_resolve() await self._check_events_pending_resolve()
return self.get_me() return self.get_me()
if phone and not code and not password: if phone and not code and not password: