|
@@ -36,7 +36,7 @@ class VseesHuaweiPushObject:
|
|
|
@return: bool
|
|
|
"""
|
|
|
LOGGER.info(
|
|
|
- '华为推送参数: '
|
|
|
+ '华为推送参数(微瞳): '
|
|
|
'uid:{}, token_val:{}, msg_title:{}, msg_text:{}, image_url:{}, event_type:{}, n_time:{}, channel:{}'.
|
|
|
format(uid, token_val, msg_title, msg_text, image_url, event_type, n_time, channel))
|
|
|
|
|
@@ -62,7 +62,7 @@ class VseesHuaweiPushObject:
|
|
|
@param channel:
|
|
|
@return: bool
|
|
|
"""
|
|
|
- LOGGER.info('{}进入发送通知推送函数'.format(uid))
|
|
|
+ LOGGER.info('{}进入发送通知推送函数(微瞳)'.format(uid))
|
|
|
msg_title = '设备昵称: {}'.format(msg_title)
|
|
|
notification = messaging.Notification(
|
|
|
title=msg_title,
|
|
@@ -102,11 +102,11 @@ class VseesHuaweiPushObject:
|
|
|
try:
|
|
|
import certifi
|
|
|
response = messaging.send_message(message, verify_peer=certifi.where())
|
|
|
- LOGGER.info('{}华为通知推送响应: {}'.format(uid, json.dumps(vars(response))))
|
|
|
+ LOGGER.info('{}华为通知推送响应(微瞳): {}'.format(uid, json.dumps(vars(response))))
|
|
|
assert (response.code == '80000000')
|
|
|
return True
|
|
|
except Exception as e:
|
|
|
- LOGGER.info('华为通知推送异常: {}'.format(repr(e)))
|
|
|
+ LOGGER.info('华为通知推送异常(微瞳): {}'.format(repr(e)))
|
|
|
return False
|
|
|
|
|
|
@staticmethod
|
|
@@ -120,7 +120,7 @@ class VseesHuaweiPushObject:
|
|
|
@param channel:
|
|
|
@return: None
|
|
|
"""
|
|
|
- LOGGER.info('{}进入发送透传推送函数'.format(uid))
|
|
|
+ LOGGER.info('{}进入发送透传推送函数(微瞳)'.format(uid))
|
|
|
data = {
|
|
|
'uid': uid, 'event_type': event_type, 'event_time': n_time, 'channel': channel
|
|
|
}
|
|
@@ -141,10 +141,10 @@ class VseesHuaweiPushObject:
|
|
|
try:
|
|
|
import certifi
|
|
|
response = messaging.send_message(message, verify_peer=certifi.where())
|
|
|
- LOGGER.info('{}华为透传推送响应: {}'.format(uid, json.dumps(vars(response))))
|
|
|
+ LOGGER.info('{}华为透传推送响应(微瞳): {}'.format(uid, json.dumps(vars(response))))
|
|
|
assert (response.code == '80000000')
|
|
|
except Exception as e:
|
|
|
- LOGGER.info('华为透传推送异常: {}'.format(repr(e)))
|
|
|
+ LOGGER.info('华为透传推送异常(微瞳): {}'.format(repr(e)))
|
|
|
|
|
|
@staticmethod
|
|
|
def android_notification(msg_title, msg_text, intent):
|
|
@@ -217,7 +217,7 @@ class VseesHuaweiPushObject:
|
|
|
try:
|
|
|
import certifi
|
|
|
response = messaging.send_message(message, verify_peer=certifi.where())
|
|
|
- LOGGER.info('{}退出登录,华为透传推送响应: {}'.format(user_id, json.dumps(vars(response))))
|
|
|
+ LOGGER.info('{}退出登录,华为透传推送响应(微瞳): {}'.format(user_id, json.dumps(vars(response))))
|
|
|
assert (response.code == '80000000')
|
|
|
except Exception as e:
|
|
|
- LOGGER.info('{}退出登录,华为透传推送异常: {}'.format(user_id, repr(e)))
|
|
|
+ LOGGER.info('{}退出登录,华为透传推送异常(微瞳): {}'.format(user_id, repr(e)))
|