Jelajahi Sumber

android fcm推送V1 调整图片字段

linhaohong 1 tahun lalu
induk
melakukan
fccc559a0d
1 mengubah file dengan 1 tambahan dan 2 penghapusan
  1. 1 2
      Service/PushService.py

+ 1 - 2
Service/PushService.py

@@ -203,7 +203,7 @@ class PushObject:
         try:
             event_type = str(event_type)
             n_time = str(n_time)
-            push_data = {'alert': 'Motion', 'msg': '', 'sound': 'sound.aif', 'zpush': '1',
+            push_data = {'alert': 'Motion', 'msg': '', 'sound': 'sound.aif', 'zpush': '1', 'image': image,
                          'received_at': n_time, 'event_time': n_time, 'event_type': event_type, 'nickname': nickname,
                          'uid': uid, 'channel': channel
                          }
@@ -215,7 +215,6 @@ class PushObject:
                 notification=messaging.Notification(
                     title=msg_title,
                     body=msg_text,
-                    image=image
                 ),
                 data=push_data,
                 token=token_val