From 01be3bce55c3759d3080fa708492478e75bdedb3 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Thu, 16 Feb 2017 21:59:42 +0800 Subject: [PATCH] Fix bug --- msg_src_adapters/mojo_weixin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msg_src_adapters/mojo_weixin.py b/msg_src_adapters/mojo_weixin.py index 8e78429b..1aa7f748 100644 --- a/msg_src_adapters/mojo_weixin.py +++ b/msg_src_adapters/mojo_weixin.py @@ -15,7 +15,7 @@ class MojoWeixinAdapter(Adapter): new_ctx = {'raw_ctx': ctx_msg, 'post_type': ctx_msg['post_type'], 'via': ctx_msg['via'], 'login_id': ctx_msg['login_id']} - if ctx_msg['type'].endswith('group_notice'): + if new_ctx['post_type'] == 'receive_message' and ctx_msg.get('type', '').endswith('notice'): new_ctx['post_type'] = 'notice' # Make 'group_notice' a notice but not a message, and ignore it later if new_ctx['post_type'] != 'receive_message':