From 26a41ec00e650c7bc476a8ca22c541c15faf960b Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 8 Apr 2018 12:46:02 +0200 Subject: [PATCH] Allow returning sms codes as int from the 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 4581371d..ca3fb1e0 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -370,7 +370,7 @@ class Client: 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 self.phone_code() + else str(self.phone_code()) ) try: