mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-08 07:54:52 +00:00
pyrofork: methods: edit_message_media: parse caption_entities field from InputMedia
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
56efb88047
commit
2317643727
1 changed files with 2 additions and 1 deletions
|
|
@ -95,12 +95,13 @@ class EditMessageMedia:
|
|||
InputMediaAudio("new_audio.mp3"))
|
||||
"""
|
||||
caption = media.caption
|
||||
caption_entities = media.caption_entities
|
||||
parse_mode = media.parse_mode
|
||||
|
||||
message, entities = None, None
|
||||
|
||||
if caption is not None:
|
||||
message, entities = (await self.parser.parse(caption, parse_mode)).values()
|
||||
message, entities = (await utils.parse_text_entities(self, caption, parse_mode, caption_entities)).values()
|
||||
|
||||
if isinstance(media, types.InputMediaPhoto):
|
||||
if isinstance(media.media, io.BytesIO) or os.path.isfile(media.media):
|
||||
|
|
|
|||
Loading…
Reference in a new issue