From 50f0122955245bf5e67c9c125756e1361735f37a Mon Sep 17 00:00:00 2001 From: Dong_master <2213070223@qq.com> Date: Mon, 17 Mar 2025 23:31:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=95=E7=94=A8=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E5=9B=9E=E5=A4=8D=EF=BC=88=E6=9A=82=E6=97=B6=E5=8F=AA?= =?UTF-8?q?=E6=98=AF=E5=BC=95=E7=94=A8=E6=98=AF=E6=9C=BA=E5=99=A8=E4=BA=BA?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=97=B6=E5=80=99=E6=9E=84=E5=BB=BAat?= =?UTF-8?q?=E5=B9=B6=E4=BC=A0=E5=85=A5=E6=B6=88=E6=81=AF=EF=BC=89=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B0=8F=E7=A8=8B=E5=BA=8F=EF=BC=8C=E8=BD=AC?= =?UTF-8?q?=E8=B4=A6=EF=BC=8C=E7=BA=A2=E5=8C=85=EF=BC=8C=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E5=8F=B7=E7=AD=89=E6=B6=88=E6=81=AF=E7=9A=84=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/platform/sources/gewechat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/platform/sources/gewechat.py b/pkg/platform/sources/gewechat.py index a7039e95..52dd06ef 100644 --- a/pkg/platform/sources/gewechat.py +++ b/pkg/platform/sources/gewechat.py @@ -155,8 +155,9 @@ class GewechatMessageConverter(adapter.MessageConverter): user_data = appmsg_data.find('.//title').text # 拿到用户消息 quote_data = appmsg_data.find('.//refermsg').find('.//content').text # 引用原文 sender_id = appmsg_data.find('.//refermsg').find('.//chatusr').text # 引用用户id + from_name = message['Data']['FromUserName']['string'] message_list =[] - if message['Wxid'] == sender_id: # 因为引用机制暂时无法响应用户,所以当引用用户是机器人是构建一个at激活机器人 + if message['Wxid'] == sender_id and from_name.endswith('@chatroom'): # 因为引用机制暂时无法响应用户,所以当引用用户是机器人是构建一个at激活机器人 message_list.append(platform_message.At(target=bot_account_id)) message_list.append(platform_message.Quote( sender_id=sender_id,