From df3f19b5348a77115a9c0e7c319b15bb6cc894e5 Mon Sep 17 00:00:00 2001 From: lanvent Date: Sat, 4 Mar 2023 20:39:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E5=BC=95=E7=94=A8=E6=B6=88?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- channel/wechat/wechat_channel.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/channel/wechat/wechat_channel.py b/channel/wechat/wechat_channel.py index 75c3c68..66778f4 100644 --- a/channel/wechat/wechat_channel.py +++ b/channel/wechat/wechat_channel.py @@ -46,6 +46,9 @@ class WechatChannel(Channel): other_user_id = msg['User']['UserName'] # 对手方id content = msg['Text'] match_prefix = self.check_prefix(content, conf().get('single_chat_prefix')) + if "」\n- - - - - - - - - - - - - - -" in content: + logger.debug("[WX]reference query skipped") + return if from_user_id == other_user_id and match_prefix is not None: # 好友向自己发送消息 if match_prefix != '': @@ -87,7 +90,9 @@ class WechatChannel(Channel): content = context_special_list[1] elif len(content_list) == 2: content = content_list[1] - + if "」\n- - - - - - - - - - - - - - -" in content: + logger.debug("[WX]reference query skipped") + return "" config = conf() match_prefix = (msg['IsAt'] and not config.get("group_at_off", False)) or self.check_prefix(origin_content, config.get('group_chat_prefix')) \ or self.check_contain(origin_content, config.get('group_chat_keyword'))