diff --git a/lib/Push.php b/lib/Push.php index 1213d7f8f..61b802e22 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -190,6 +190,12 @@ protected function encryptAndSign(Key $userKey, array $device, INotification $no 'id' => $notification->getObjectId(), ]; + if ($isTalkNotification) { + $priority = 'high'; + } else { + $priority = 'normal'; + } + if (!openssl_public_encrypt(json_encode($data), $encryptedSubject, $device['devicepublickey'], OPENSSL_PKCS1_PADDING)) { $this->log->error(openssl_error_string(), ['app' => 'notifications']); throw new \InvalidArgumentException('Failed to encrypt message for device'); @@ -204,6 +210,7 @@ protected function encryptAndSign(Key $userKey, array $device, INotification $no 'pushTokenHash' => $device['pushtokenhash'], 'subject' => $base64EncryptedSubject, 'signature' => $base64Signature, + 'priority' => $priority, ]; }