浏览代码

fix: empty content issue

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

+ 3 - 0
channel/wechat/wechat_channel.py

@@ -244,6 +244,9 @@ class WechatChannel(Channel):
 
     # 处理消息 TODO: 如果wechaty解耦,此处逻辑可以放置到父类
     def handle(self, context):
+        if not context.content:
+            return 
+        
         reply = Reply()
 
         logger.debug('[WX] ready to handle context: {}'.format(context))