2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 21:07:59 +00:00

Pass the phone number when calling the phone_code callback function

This commit is contained in:
Dan 2018-06-24 16:11:22 +02:00
parent 66f91b1b63
commit 47043380fb

View File

@ -469,7 +469,7 @@ class Client(Methods, BaseClient):
self.phone_code = (
input("Enter phone code: ") if self.phone_code is None
else self.phone_code if type(self.phone_code) is str
else str(self.phone_code())
else str(self.phone_code(self.phone_number))
)
try: