Skip to content

Commit d9900e3

Browse files
committed
Checking if vCard exists is not necessary
1 parent 86ff673 commit d9900e3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

telegram/bot.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,10 +1143,8 @@ def send_contact(self,
11431143
if isinstance(contact, Contact):
11441144
phone_number = contact.phone_number
11451145
first_name = contact.first_name
1146-
if contact.last_name:
1147-
last_name = contact.last_name
1148-
if contact.vcard:
1149-
vcard = contact.vcard
1146+
last_name = contact.last_name
1147+
vcard = contact.vcard
11501148

11511149
data = {'chat_id': chat_id, 'phone_number': phone_number, 'first_name': first_name}
11521150

0 commit comments

Comments
 (0)