File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1093,12 +1093,12 @@ def send_contact(self,
10931093 phone_number = None ,
10941094 first_name = None ,
10951095 last_name = None ,
1096- vcard = None ,
10971096 disable_notification = False ,
10981097 reply_to_message_id = None ,
10991098 reply_markup = None ,
11001099 timeout = None ,
11011100 contact = None ,
1101+ vcard = None ,
11021102 ** kwargs ):
11031103 """Use this method to send phone contacts.
11041104
@@ -1143,8 +1143,10 @@ def send_contact(self,
11431143 if isinstance (contact , Contact ):
11441144 phone_number = contact .phone_number
11451145 first_name = contact .first_name
1146- last_name = contact .last_name
1147- vcard = contact .vcard
1146+ if contact .last_name :
1147+ last_name = contact .last_name
1148+ if contact .vcard :
1149+ vcard = contact .vcard
11481150
11491151 data = {'chat_id' : chat_id , 'phone_number' : phone_number , 'first_name' : first_name }
11501152
Original file line number Diff line number Diff line change @@ -66,12 +66,12 @@ def __init__(self,
6666 phone_number ,
6767 first_name ,
6868 last_name = None ,
69- vcard = None ,
7069 reply_markup = None ,
7170 input_message_content = None ,
7271 thumb_url = None ,
7372 thumb_width = None ,
7473 thumb_height = None ,
74+ vcard = None ,
7575 ** kwargs ):
7676 # Required
7777 super (InlineQueryResultContact , self ).__init__ ('contact' , id )
You can’t perform that action at this time.
0 commit comments