Explorar o código

fix: ignore system message

zhayujie %!s(int64=2) %!d(string=hai) anos
pai
achega
aaed3f9839
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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