From b47d63334f6de5605e65b5e95faa4644a8607e4f Mon Sep 17 00:00:00 2001 From: beat4ocean Date: Tue, 11 Mar 2025 15:48:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dgewechat=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E7=94=A8=E6=88=B7=E6=9C=AC=E4=BA=BA=E5=8F=91=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E8=A7=A6=E5=8F=91=E6=B6=88=E6=81=AF=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/platform/sources/gewechat/client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/astrbot/core/platform/sources/gewechat/client.py b/astrbot/core/platform/sources/gewechat/client.py index 7268efded..283425848 100644 --- a/astrbot/core/platform/sources/gewechat/client.py +++ b/astrbot/core/platform/sources/gewechat/client.py @@ -147,6 +147,11 @@ class SimpleGewechatClient: abm.type = MessageType.FRIEND_MESSAGE user_id = from_user_name + # 检查消息是否由自己发送,若是则忽略 + if user_id == abm.self_id: + logger.info("忽略自己发送的消息") + return None + abm.message = [] if at_me: abm.message.insert(0, At(qq=abm.self_id))