Browse Source

极光推送增加uid数据

peng 2 năm trước cách đây
mục cha
commit
08e5461ad6
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Service/PushService.py

+ 1 - 1
Service/PushService.py

@@ -204,7 +204,7 @@ class PushObject:
             _jpush = jpush.JPush(app_key, master_secret)
             push = _jpush.create_push()
             push.audience = jpush.registration_id(token_val)
-            push_data = {'alert': 'Motion', 'msg': '', 'sound': 'sound.aif', 'zpush': '1',
+            push_data = {'alert': 'Motion', 'msg': '', 'sound': 'sound.aif', 'zpush': '1', 'uid': nickname,
                          'received_at': n_time, 'event_time': n_time, 'event_type': event_type, 'nickname': nickname
                          }
             android = jpush.android(title=msg_title, big_text=msg_text, alert=msg_text, extras=push_data,