mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +00:00
Make send_venue return the new type
This commit is contained in:
parent
4bbdadaa17
commit
58c9f321b4
@ -2231,12 +2231,12 @@ class Client:
|
||||
If the message is a reply, ID of the original message
|
||||
|
||||
Returns:
|
||||
On success, the sent Message is returned.
|
||||
On success, the sent :obj:`Message <pyrogram.Message>` is returned.
|
||||
|
||||
Raises:
|
||||
:class:`Error <pyrogram.Error>`
|
||||
"""
|
||||
return self.send(
|
||||
r = self.send(
|
||||
functions.messages.SendMedia(
|
||||
peer=self.resolve_peer(chat_id),
|
||||
media=types.InputMediaVenue(
|
||||
@ -2257,6 +2257,13 @@ class Client:
|
||||
)
|
||||
)
|
||||
|
||||
for i in r.updates:
|
||||
if isinstance(i, (types.UpdateNewMessage, types.UpdateNewChannelMessage)):
|
||||
users = {i.id: i for i in r.users}
|
||||
chats = {i.id: i for i in r.chats}
|
||||
|
||||
return message_parser.parse_message(self, i.message, users, chats)
|
||||
|
||||
def send_contact(self,
|
||||
chat_id: int or str,
|
||||
phone_number: str,
|
||||
|
Loading…
x
Reference in New Issue
Block a user