mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-01-24 00:04:14 +03:00
Fix TelegramClient.sign_in not accepting an integer for the code
This commit is contained in:
parent
4384ccb132
commit
b7dbf9767e
|
@ -281,8 +281,11 @@ class TelegramClient(TelegramBareClient):
|
|||
'Please make sure to call send_code_request first.')
|
||||
|
||||
try:
|
||||
if isinstance(code, int):
|
||||
code = str(code)
|
||||
result = self(SignInRequest(
|
||||
phone_number, self._phone_code_hashes[phone_number], code))
|
||||
phone_number, self._phone_code_hashes[phone_number], code
|
||||
))
|
||||
|
||||
except (PhoneCodeEmptyError, PhoneCodeExpiredError,
|
||||
PhoneCodeHashEmptyError, PhoneCodeInvalidError):
|
||||
|
|
Loading…
Reference in New Issue
Block a user