Browse Source

Merge remote-tracking branch 'remotes/origin/locky' into test

Ansjer 1 year ago
parent
commit
647303de5f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Service/PushService.py

+ 2 - 1
Service/PushService.py

@@ -130,7 +130,8 @@ class PushObject:
                          'received_at': n_time, 'event_time': n_time, 'event_type': event_type, 'nickname': nickname,
                          'image_url': launch_image
                          }
-            payload = apns2.Payload(alert=alert, custom=push_data, sound='default', category='myCategory',
+            sound = 'call_phone.mp3' if event_type in [606, 607] else 'default'
+            payload = apns2.Payload(alert=alert, custom=push_data, sound=sound, category='myCategory',
                                     mutable_content=True)
             n = apns2.Notification(payload=payload, priority=apns2.PRIORITY_LOW)
             res = cli.push(n=n, device_token=token_val, topic=app_bundle_id)