浏览代码

fix: ignore system message

zhayujie 2 年之前
父节点
当前提交
aaed3f9839
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      channel/wechat/wechat_channel.py

+ 3 - 0
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