mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 11:10:18 +03:00
Update auth.py
This commit is contained in:
parent
11032cddd1
commit
6443a4ae7d
|
@ -317,7 +317,7 @@ class AuthMethods:
|
|||
|
||||
if phone and not code and not password:
|
||||
return await self.send_code_request(phone)
|
||||
elif code :
|
||||
elif code:
|
||||
phone, phone_code_hash = \
|
||||
self._parse_phone_and_hash(phone, phone_code_hash)
|
||||
|
||||
|
@ -327,7 +327,7 @@ class AuthMethods:
|
|||
result = await self(functions.auth.SignInRequest(
|
||||
phone, phone_code_hash, str(code)))
|
||||
except errors.RPCError:
|
||||
return self.sign_in(password=password)
|
||||
return await self.sign_in(password=password)
|
||||
elif password:
|
||||
pwd = await self(functions.account.GetPasswordRequest())
|
||||
result = await self(functions.auth.CheckPasswordRequest(
|
||||
|
|
Loading…
Reference in New Issue
Block a user