|
@@ -229,14 +229,6 @@ class PushObject:
|
|
|
apns_url = "https://api.sandbox.push.apple.com" if CONFIG_INFO == CONFIG_TEST else "https://api.push.apple.com"
|
|
apns_url = "https://api.sandbox.push.apple.com" if CONFIG_INFO == CONFIG_TEST else "https://api.push.apple.com"
|
|
|
url = f"{apns_url}/3/device/{token_val}"
|
|
url = f"{apns_url}/3/device/{token_val}"
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- jump_type = CommonService.get_jump_type(event_type)
|
|
|
|
|
- push_data = {
|
|
|
|
|
- 'alert': msg_text, 'msg': '', 'sound': '',
|
|
|
|
|
- 'zpush': '1', 'uid': uid, 'channel': channel,
|
|
|
|
|
- 'received_at': n_time, 'event_time': n_time, 'event_type': event_type,
|
|
|
|
|
- 'nickname': nickname, 'image_url': launch_image, 'jump_type': jump_type
|
|
|
|
|
- }
|
|
|
|
|
sound = 'call_phone.mp3' if event_type in DATA_PUSH_EVENT_TYPE_LIST else 'default'
|
|
sound = 'call_phone.mp3' if event_type in DATA_PUSH_EVENT_TYPE_LIST else 'default'
|
|
|
|
|
|
|
|
body = {
|
|
body = {
|
|
@@ -249,7 +241,15 @@ class PushObject:
|
|
|
"category": "myCategory",
|
|
"category": "myCategory",
|
|
|
"mutable-content": 1
|
|
"mutable-content": 1
|
|
|
},
|
|
},
|
|
|
- "custom": push_data
|
|
|
|
|
|
|
+ "image_url": launch_image,
|
|
|
|
|
+ "uid": uid,
|
|
|
|
|
+ "channel": channel,
|
|
|
|
|
+ "received_at": n_time,
|
|
|
|
|
+ "event_time": n_time,
|
|
|
|
|
+ "event_type": event_type,
|
|
|
|
|
+ "nickname": nickname,
|
|
|
|
|
+ "zpush": "1",
|
|
|
|
|
+ "jump_type": CommonService.get_jump_type(event_type)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
headers = {
|
|
headers = {
|