From 1593bcb5372601f86335b737e2d13a40e6ae87c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E7=9B=AE=E4=BE=A7=E8=80=B3?= Date: Thu, 15 May 2025 17:50:29 +0800 Subject: [PATCH] Update astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- .../platform/sources/wechatpadpro/wechatpadpro_adapter.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py b/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py index ad0a5fe16..ec1d9aa3c 100644 --- a/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py +++ b/astrbot/core/platform/sources/wechatpadpro/wechatpadpro_adapter.py @@ -345,8 +345,10 @@ class WeChatPadProAdapter(Platform): # 先判断群聊/私聊并设置基本属性 await self._process_chat_type(abm, raw_message, from_user_name, to_user_name, content) - # 如果是机器人自己发送的消息,忽略 - if from_user_name == self.wxid: + # 如果是机器人自己发送的消息、回显消息或系统消息,忽略 + is_echo = raw_message.get("is_echo", False) or raw_message.get("msg_source") == "send" + is_system = msg_type in ("system", "sys") + if from_user_name == self.wxid or to_user_name == self.wxid or is_echo or is_system: return None # 再根据消息类型处理消息内容