From aaed3f9839446e0a1d58c3bc4900e71e8d9c18cc Mon Sep 17 00:00:00 2001 From: zhayujie Date: Wed, 18 Oct 2023 11:14:44 +0800 Subject: [PATCH] fix: ignore system message --- channel/wechat/wechat_channel.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/channel/wechat/wechat_channel.py b/channel/wechat/wechat_channel.py index 504c368..0989a85 100644 --- a/channel/wechat/wechat_channel.py +++ b/channel/wechat/wechat_channel.py @@ -142,6 +142,9 @@ class WechatChannel(ChatChannel): @time_checker @_check def handle_single(self, cmsg: ChatMessage): + # filter system message + if cmsg.other_user_id in ["weixin"]: + return if cmsg.ctype == ContextType.VOICE: if conf().get("speech_recognition") != True: return