mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-04-27 20:33:44 +03:00
Preserve backward compatibility with old .sign_in() code
This commit is contained in:
parent
5f636fdf31
commit
bea1b7f526
|
@ -267,10 +267,10 @@ class TelegramClient(TelegramBareClient):
|
||||||
If the login succeeds, the logged in user is returned.
|
If the login succeeds, the logged in user is returned.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if phone:
|
if phone and not code:
|
||||||
return self.send_code_request(phone)
|
return self.send_code_request(phone)
|
||||||
elif code:
|
elif code:
|
||||||
if self._phone == None:
|
if self._phone is None:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
'Please make sure to call send_code_request first.')
|
'Please make sure to call send_code_request first.')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user