diff --git a/lib/Push.php b/lib/Push.php index 810a00399..441746f8c 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -274,8 +274,10 @@ protected function encryptAndSign(Key $userKey, array $device, int $id, INotific 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 @@ protected function encryptAndSign(Key $userKey, array $device, int $id, INotific 'subject' => $base64EncryptedSubject, 'signature' => $base64Signature, 'priority' => $priority, + 'type' => $type, ]; } @@ -334,6 +337,7 @@ protected function encryptAndSignDelete(Key $userKey, array $device, int $id): a 'subject' => $base64EncryptedSubject, 'signature' => $base64Signature, 'priority' => 'normal', + 'type' => 'background', ]; }