From 1a7eb21fc7817d50e0cba89e804c323cf6ce08c6 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Tue, 11 Mar 2025 14:54:41 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=F0=9F=90=9B=20fix:=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20gewechat=20=E9=83=A8=E5=88=86=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=B8=8B=E4=B8=8B=E8=BD=BD=E5=9B=BE=E7=89=87=E6=8A=A5=E9=94=99?= =?UTF-8?q?=20#700"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c38fa77ce65e5da6e58ba4f72436eee1dfa155e9. --- .../core/platform/sources/gewechat/client.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/astrbot/core/platform/sources/gewechat/client.py b/astrbot/core/platform/sources/gewechat/client.py index 7268efded..f241b1dd6 100644 --- a/astrbot/core/platform/sources/gewechat/client.py +++ b/astrbot/core/platform/sources/gewechat/client.py @@ -186,17 +186,12 @@ class SimpleGewechatClient: abm.message_str = content case 3: # 图片消息 - # 先看看 base64 数据 - if "ImgBuf" in d and "buffer" in d["ImgBuf"]: - logger.debug("发现图片消息包含 base64 数据,使用。") - abm.message.append(Image.fromBase64(d["ImgBuf"]["buffer"])) - else: - file_url = await self.multimedia_downloader.download_image( - self.appid, content - ) - logger.debug(f"下载图片: {file_url}") - file_path = await download_image_by_url(file_url) - abm.message.append(Image(file=file_path, url=file_path)) + file_url = await self.multimedia_downloader.download_image( + self.appid, content + ) + logger.debug(f"下载图片: {file_url}") + file_path = await download_image_by_url(file_url) + abm.message.append(Image(file=file_path, url=file_path)) case 34: # 语音消息