Explorar el Código

fix: single reply in no prefix

zhayujie hace 3 años
padre
commit
efd12dac35
Se han modificado 2 ficheros con 3 adiciones y 2 borrados
  1. 2 1
      .gitignore
  2. 1 1
      channel/wechat/wechat_channel.py

+ 2 - 1
.gitignore

@@ -8,4 +8,5 @@ config.json
 QR.png
 QR.png
 nohup.out
 nohup.out
 tmp
 tmp
-plugins.json
+plugins.json
+itchat.pkl

+ 1 - 1
channel/wechat/wechat_channel.py

@@ -95,7 +95,7 @@ class WechatChannel(Channel):
             return
             return
         if match_prefix:
         if match_prefix:
             content = content.replace(match_prefix, '', 1).strip()
             content = content.replace(match_prefix, '', 1).strip()
-        else:
+        elif match_prefix is None:
             return
             return
         context = Context()
         context = Context()
         context.kwargs = {'isgroup': False, 'msg': msg, 'receiver': other_user_id, 'session_id': other_user_id}
         context.kwargs = {'isgroup': False, 'msg': msg, 'receiver': other_user_id, 'session_id': other_user_id}