mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
fix caption of multiple inline query results
This commit is contained in:
@@ -197,7 +197,7 @@ class TGTweet(Tweet):
|
|||||||
id=str(i),
|
id=str(i),
|
||||||
photo_url=tweet_media.url,
|
photo_url=tweet_media.url,
|
||||||
thumbnail_url=tweet_media.thumb,
|
thumbnail_url=tweet_media.thumb,
|
||||||
caption=self.message_text if not i else None
|
caption=self.message_text
|
||||||
)
|
)
|
||||||
elif tweet_media.type == "video":
|
elif tweet_media.type == "video":
|
||||||
yield InlineQueryResultVideo(
|
yield InlineQueryResultVideo(
|
||||||
@@ -206,14 +206,14 @@ class TGTweet(Tweet):
|
|||||||
mime_type="video/mp4",
|
mime_type="video/mp4",
|
||||||
thumbnail_url=tweet_media.thumb,
|
thumbnail_url=tweet_media.thumb,
|
||||||
title=self.text,
|
title=self.text,
|
||||||
caption=self.message_text if not i else None
|
caption=self.message_text
|
||||||
)
|
)
|
||||||
elif tweet_media.type == "gif":
|
elif tweet_media.type == "gif":
|
||||||
yield InlineQueryResultMpeg4Gif(
|
yield InlineQueryResultMpeg4Gif(
|
||||||
id=str(i),
|
id=str(i),
|
||||||
mpeg4_url=tweet_media.url,
|
mpeg4_url=tweet_media.url,
|
||||||
thumbnail_url=tweet_media.thumb,
|
thumbnail_url=tweet_media.thumb,
|
||||||
caption=self.message_text if not i else None
|
caption=self.message_text
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in New Issue
Block a user