peng 1 жил өмнө
parent
commit
404583e2b7
1 өөрчлөгдсөн 10 нэмэгдсэн , 9 устгасан
  1. 10 9
      Service/PushService.py

+ 10 - 9
Service/PushService.py

@@ -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]
             }