Add mojo_weixin adapter

This commit is contained in:
Richard Chien
2017-02-15 18:07:36 +08:00
parent 3508db348d
commit 47921d50ee
7 changed files with 128 additions and 19 deletions

View File

@ -0,0 +1,10 @@
"""
This filter intercepts all post data except ones of which 'post_type' is 'message'.
"""
from filter import as_filter
@as_filter(priority=10000)
def _filter(ctx_msg):
return ctx_msg.get('post_type') == 'message'

View File

@ -0,0 +1,10 @@
"""
This filter intercepts messages that are from massive platforms.
"""
from filter import as_filter
@as_filter(priority=100)
def _filter(ctx_msg):
return not ctx_msg.get('is_massive_platform', False)