From 181d284528da97484e973b893472f27fd93fcf89 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Mon, 2 Dec 2024 16:22:10 +0800 Subject: [PATCH] :bug: Fix Template Service cache edit_inline_media --- services/template/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/template/models.py b/services/template/models.py index 21bbeeb..8c75fcd 100644 --- a/services/template/models.py +++ b/services/template/models.py @@ -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(