From 200ed844fe24333a4ac21f2b98fa0a845a103d04 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 11 Jan 2019 13:02:19 +0100 Subject: [PATCH] Fix first_name and last_name not being called if they are callable --- pyrogram/client/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 61a3775b..2a3a420d 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -578,13 +578,13 @@ class Client(Methods, BaseClient): if not phone_registered: self.first_name = ( input("First name: ") if self.first_name is None - else str(self.first_name) if callable(self.first_name) + else str(self.first_name()) if callable(self.first_name) else str(self.first_name) ) self.last_name = ( input("Last name: ") if self.last_name is None - else str(self.last_name) if callable(self.last_name) + else str(self.last_name()) if callable(self.last_name) else str(self.last_name) )