Browse Source

fix: ignore system message

master
zhayujie 1 year ago
parent
commit
aaed3f9839
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      channel/wechat/wechat_channel.py

+ 3
- 0
channel/wechat/wechat_channel.py View File

@@ -142,6 +142,9 @@ class WechatChannel(ChatChannel):
@time_checker @time_checker
@_check @_check
def handle_single(self, cmsg: ChatMessage): def handle_single(self, cmsg: ChatMessage):
# filter system message
if cmsg.other_user_id in ["weixin"]:
return
if cmsg.ctype == ContextType.VOICE: if cmsg.ctype == ContextType.VOICE:
if conf().get("speech_recognition") != True: if conf().get("speech_recognition") != True:
return return


Loading…
Cancel
Save