🐛 Fix Template Service cache edit_inline_media

This commit is contained in:
xtaodada 2024-12-02 16:22:10 +08:00
parent d10f0d4815
commit 181d284528
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -129,8 +129,11 @@ class RenderResult:
"""是 `message.edit_media` 的封装,上传成功后,缓存 telegram 返回的 file_id方便重复使用"""
bot = callback_query.get_bot()
reply = await self.send_photo_to_helper_channel(bot, filename)
file_id = self.get_file_id(reply)
if self.is_file_id():
file_id = self.photo
else:
reply = await self.send_photo_to_helper_channel(bot, filename)
file_id = self.get_file_id(reply)
if self.file_type == FileType.DOCUMENT:
media = InputMediaDocument(