mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added vCard support when sharing contacts
This commit is contained in:
parent
0a847c4de7
commit
f635b5c965
4 changed files with 6 additions and 0 deletions
|
|
@ -706,6 +706,7 @@ class Bot(BaseBot):
|
|||
async def send_contact(self, chat_id: typing.Union[base.Integer, base.String],
|
||||
phone_number: base.String, first_name: base.String,
|
||||
last_name: typing.Union[base.String, None] = None,
|
||||
vcard: typing.Union[base.String, None] = None,
|
||||
disable_notification: typing.Union[base.Boolean, None] = None,
|
||||
reply_to_message_id: typing.Union[base.Integer, None] = None,
|
||||
reply_markup: typing.Union[types.InlineKeyboardMarkup,
|
||||
|
|
@ -725,6 +726,8 @@ class Bot(BaseBot):
|
|||
:type first_name: :obj:`base.String`
|
||||
:param last_name: Contact's last name
|
||||
:type last_name: :obj:`typing.Union[base.String, None]`
|
||||
:param vcard: vcard
|
||||
:type vcard: :obj:`typing.Union[base.String, None]`
|
||||
:param disable_notification: Sends the message silently. Users will receive a notification with no sound.
|
||||
:type disable_notification: :obj:`typing.Union[base.Boolean, None]`
|
||||
:param reply_to_message_id: If the message is a reply, ID of the original message
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ class Contact(base.TelegramObject):
|
|||
first_name: base.String = fields.Field()
|
||||
last_name: base.String = fields.Field()
|
||||
user_id: base.Integer = fields.Field()
|
||||
vcard: base.String = fields.Field()
|
||||
|
||||
@property
|
||||
def full_name(self):
|
||||
|
|
|
|||
|
|
@ -441,6 +441,7 @@ class InlineQueryResultContact(InlineQueryResult):
|
|||
phone_number: base.String = fields.Field()
|
||||
first_name: base.String = fields.Field()
|
||||
last_name: base.String = fields.Field()
|
||||
vcard: base.String = fields.Field()
|
||||
input_message_content: InputMessageContent = fields.Field(base=InputMessageContent)
|
||||
thumb_url: base.String = fields.Field()
|
||||
thumb_width: base.Integer = fields.Field()
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class InputContactMessageContent(InputMessageContent):
|
|||
phone_number: base.String = fields.Field()
|
||||
first_name: base.String = fields.Field()
|
||||
last_name: base.String = fields.Field()
|
||||
vcard: base.String = fields.Field()
|
||||
|
||||
def __init__(self, phone_number: base.String,
|
||||
first_name: typing.Optional[base.String] = None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue