mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Add missing await on send_code_request
This commit is contained in:
parent
1e17ef1c98
commit
c0e506e568
|
@ -391,6 +391,7 @@ class AuthMethods(MessageParseMethods, UserMethods):
|
|||
Returns:
|
||||
An instance of :tl:`SentCode`.
|
||||
"""
|
||||
result = None
|
||||
phone = utils.parse_phone(phone) or self._phone
|
||||
phone_hash = self._phone_code_hash.get(phone)
|
||||
|
||||
|
@ -399,7 +400,7 @@ class AuthMethods(MessageParseMethods, UserMethods):
|
|||
result = await self(functions.auth.SendCodeRequest(
|
||||
phone, self.api_id, self.api_hash, types.CodeSettings()))
|
||||
except errors.AuthRestartError:
|
||||
return self.send_code_request(phone, force_sms=force_sms)
|
||||
return await self.send_code_request(phone, force_sms=force_sms)
|
||||
|
||||
self._tos = result.terms_of_service
|
||||
self._phone_code_hash[phone] = phone_hash = result.phone_code_hash
|
||||
|
|
Loading…
Reference in New Issue
Block a user