From 5c26ce215b314108611e6a65cd3df69932fd4d41 Mon Sep 17 00:00:00 2001 From: Dong_master <2213070223@qq.com> Date: Wed, 23 Apr 2025 02:36:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E8=BD=AC=E5=8F=91?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/platform/sources/gewechat.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/platform/sources/gewechat.py b/pkg/platform/sources/gewechat.py index ba8f0490..796cabe2 100644 --- a/pkg/platform/sources/gewechat.py +++ b/pkg/platform/sources/gewechat.py @@ -59,7 +59,7 @@ class GewechatMessageConverter(adapter.MessageConverter): content_list.append({'type': 'WeChatLink', 'link_title': component.link_title, 'link_desc': component.link_desc, 'link_thumb_url': component.link_thumb_url, 'link_url': component.link_url}) elif isinstance(component, platform_message.WeChatForwardLink): - content_list.append({'type': 'WeChatLink', 'xml_data': component.xml_data}) + content_list.append({'type': 'WeChatForwardLink', 'xml_data': component.xml_data}) elif isinstance(component, platform_message.Voice): @@ -399,8 +399,8 @@ class GeWeChatAdapter(adapter.MessagePlatformAdapter): ,title=msg['link_title'], desc=msg['link_desc'] , link_url=msg['link_url'], thumb_url=msg['link_thumb_url']) - elif msg['type'] == 'WeChatForwardMiniPrograms': - self.bot.forward_mini_app(app_id=self.config['app_id'], to_wxid=target_id, xml=msg['xml_data']) + elif msg['type'] == 'WeChatForwardLink': + self.bot.forward_url(app_id=self.config['app_id'], to_wxid=target_id, xml=msg['xml_data']) elif msg['type'] == 'voice': self.bot.post_voice(app_id=self.config['app_id'], to_wxid=target_id, voice_url=msg['voice_url'],voice_duration=msg['length']) @@ -452,6 +452,8 @@ class GeWeChatAdapter(adapter.MessagePlatformAdapter): self.bot.post_link(app_id=self.config['app_id'], to_wxid=target_id , title=msg['link_title'], desc=msg['link_desc'] , link_url=msg['link_url'], thumb_url=msg['link_thumb_url']) + elif msg['type'] == 'WeChatForwardLink': + self.bot.forward_url(app_id=self.config['app_id'], to_wxid=target_id, xml=msg['xml_data']) elif msg['type'] == 'voice': self.bot.post_voice(app_id=self.config['app_id'], to_wxid=target_id, voice_url=msg['voice_url'], voice_duration=msg['length'])