|
@@ -35,11 +35,11 @@ class HuaweiPushObject:
|
|
|
@return:
|
|
|
"""
|
|
|
LOGGER.info(
|
|
|
- '华为推送参数: token_val:{}, msg_title:{}, msg_text:{}, image_url:{}, uid:{}, event_type:{}, n_time:{}'.format(
|
|
|
- token_val, msg_title, msg_text, image_url, uid, event_type, n_time))
|
|
|
+ '华为推送参数: uid:{}, token_val:{}, msg_title:{}, msg_text:{}, image_url:{}, event_type:{}, n_time:{}'.format(
|
|
|
+ uid, token_val, msg_title, msg_text, image_url, event_type, n_time))
|
|
|
|
|
|
self.send_notify_message(msg_title, msg_text, image_url, uid, nickname, event_type, n_time, token_val)
|
|
|
- if int(event_type) == 606:
|
|
|
+ if int(event_type) in [606, 607]:
|
|
|
self.send_data_message(uid, event_type, n_time, token_val)
|
|
|
|
|
|
def send_notify_message(self, msg_title, msg_text, image_url, uid, nickname, event_type, n_time, token_val):
|
|
@@ -159,5 +159,9 @@ class HuaweiPushObject:
|
|
|
badge=messaging.AndroidBadgeNotification(
|
|
|
add_num=1, clazz='Classic'),
|
|
|
visibility=messaging.AndroidNotification.PUBLIC,
|
|
|
- foreground_show=False
|
|
|
+ foreground_show=False,
|
|
|
+ # buttons=[
|
|
|
+ # {'name': '接听', 'action_type': 1},
|
|
|
+ # {'name': '拒绝', 'action_type': 3}
|
|
|
+ # ]
|
|
|
)
|