diff options
-rw-r--r-- | lib/Push.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Push.php b/lib/Push.php index 810a003..441746f 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -274,8 +274,10 @@ class Push { if ($isTalkNotification) { $priority = 'high'; + $type = $data['type'] === 'call' ? 'voip' : 'alert'; } else { $priority = 'normal'; + $type = 'alert'; } if (!openssl_public_encrypt(json_encode($data), $encryptedSubject, $device['devicepublickey'], OPENSSL_PKCS1_PADDING)) { @@ -293,6 +295,7 @@ class Push { 'subject' => $base64EncryptedSubject, 'signature' => $base64Signature, 'priority' => $priority, + 'type' => $type, ]; } @@ -334,6 +337,7 @@ class Push { 'subject' => $base64EncryptedSubject, 'signature' => $base64Signature, 'priority' => 'normal', + 'type' => 'background', ]; } |