|
@@ -520,19 +520,20 @@ class PushObject:
|
|
|
'timestamp': str(int(time.time()) * 1000)}
|
|
|
extra_data = {'alert': 'Motion', 'msg': '', 'sound': 'sound.aif', 'zpush': '1',
|
|
|
'received_at': n_time, 'event_time': n_time, 'event_type': event_type, 'nickname': nickname,
|
|
|
- 'uid': uid, 'channel': channel
|
|
|
+ 'uid': uid, 'channel': channel, 'title': msg_title, 'body': msg_text
|
|
|
}
|
|
|
push_data = {
|
|
|
"android": {
|
|
|
- "data": json.dumps(extra_data),
|
|
|
- "notification": {
|
|
|
- "body": msg_text,
|
|
|
- "title": msg_title,
|
|
|
- "clickAction": {
|
|
|
- "type": 3
|
|
|
- }
|
|
|
- }
|
|
|
+ # "data": json.dumps(extra_data),
|
|
|
+ # "notification": {
|
|
|
+ # "body": msg_text,
|
|
|
+ # "title": msg_title,
|
|
|
+ # "clickAction": {
|
|
|
+ # "type": 3
|
|
|
+ # }
|
|
|
+ # }
|
|
|
},
|
|
|
+ "data": json.dumps(extra_data),
|
|
|
"notification": {},
|
|
|
"token": [token_val]
|
|
|
}
|