import jpush as jpush
from monthertree.conf import app_key, master_secret

def jpush_send_message(push_data, push_target, id):
	_jpush = jpush.JPush(app_key, master_secret)
	push = _jpush.create_push()
	push.audience = jpush.audience(
		# push_target may user account or phone number
		jpush.tag(push_target)
	)
	push.message = jpush.message(msg_content=id, extras=push_data)
	push.platform = jpush.all_
	push.send()

@@ -397,16 +397,55 @@
 sh.all_%0A
+%09push.options = %7B%22time_to_live%22:86400%7D%0A
 %09push.se

add offline support