From 47043380fbd1aa645d88d99692f52e2f6d93e58d Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 24 Jun 2018 16:11:22 +0200 Subject: [PATCH] Pass the phone number when calling the phone_code callback function --- pyrogram/client/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 24bf09eb..91bdc1a6 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -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: