From d916fda04c42968a084cc56639872ae975c0892f Mon Sep 17 00:00:00 2001 From: XiGuang <1046532637@qq.com> Date: Sat, 19 Apr 2025 12:10:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=BC=BA=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E5=B5=8C=E5=A5=97=E6=B6=88=E6=81=AF=E8=A7=A3?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/platform/sources/gewechat/client.py | 3 +++ .../platform/sources/gewechat/xml_data_parser.py | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/astrbot/core/platform/sources/gewechat/client.py b/astrbot/core/platform/sources/gewechat/client.py index 9fe0d0999..5045b71f8 100644 --- a/astrbot/core/platform/sources/gewechat/client.py +++ b/astrbot/core/platform/sources/gewechat/client.py @@ -252,6 +252,9 @@ class SimpleGewechatClient: abm_data = data_parser.parse_mutil_49() if abm_data: abm.message.append(abm_data) + abm.message_str = abm_data.message_str + abm.message.append(Plain(abm_data.message_str)) + abm.message[-2].message_str = abm.message[-2].sender_str case 51: # 帐号消息同步? logger.info("消息类型(51):帐号消息同步?") case 10000: # 被踢出群聊/更换群主/修改群名称 diff --git a/astrbot/core/platform/sources/gewechat/xml_data_parser.py b/astrbot/core/platform/sources/gewechat/xml_data_parser.py index 476c37644..ae05860c0 100644 --- a/astrbot/core/platform/sources/gewechat/xml_data_parser.py +++ b/astrbot/core/platform/sources/gewechat/xml_data_parser.py @@ -57,7 +57,20 @@ class GeweDataParser: if displayname is not None: replied_nickname = displayname.text if refermsg_content is not None: - replied_content = refermsg_content.text + # 处理引用嵌套,包括嵌套公众号消息 + if refermsg_content.text.startswith("") or refermsg_content.text.startswith("