|
@@ -16,7 +16,7 @@ class HuaweiPushObject:
|
|
|
"""init sdk app"""
|
|
|
push_admin.initialize_app(self.app_id, self.app_secret)
|
|
|
|
|
|
- def send_push_notify_message(self, nickname, msg_title, msg_text, image_url, token_val):
|
|
|
+ def send_push_notify_message(self, msg_title, msg_text, image_url, token_val):
|
|
|
"""
|
|
|
发送推送消息
|
|
|
|
|
@@ -30,7 +30,7 @@ class HuaweiPushObject:
|
|
|
image=image_url
|
|
|
)
|
|
|
# 推送通知内容配置
|
|
|
- android_notification = self.android_notification(nickname, msg_title, msg_text)
|
|
|
+ android_notification = self.android_notification(msg_title, msg_text)
|
|
|
# 安卓配置
|
|
|
android = messaging.AndroidConfig(
|
|
|
collapse_key=-1,
|
|
@@ -61,7 +61,7 @@ class HuaweiPushObject:
|
|
|
print(repr(e))
|
|
|
|
|
|
@staticmethod
|
|
|
- def android_notification(nickname, msg_title, msg_text):
|
|
|
+ def android_notification(msg_title, msg_text):
|
|
|
return messaging.AndroidNotification(
|
|
|
icon='/raw/ic_launcher2',
|
|
|
color='#AACCDD',
|
|
@@ -76,7 +76,7 @@ class HuaweiPushObject:
|
|
|
title_loc_key='M.String.title',
|
|
|
title_loc_args=['Girl', 'Cat'],
|
|
|
channel_id='1',
|
|
|
- notify_summary=nickname,
|
|
|
+ notify_summary='',
|
|
|
multi_lang_key={'title_key': {'en': 'value1'}, 'body_key': {'en': 'value2'}},
|
|
|
style=0,
|
|
|
big_title=msg_title,
|