Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Push.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Push.php b/lib/Push.php
index 45ea676..d25f882 100644
--- a/lib/Push.php
+++ b/lib/Push.php
@@ -188,6 +188,12 @@ class Push {
'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');
@@ -202,6 +208,7 @@ class Push {
'pushTokenHash' => $device['pushtokenhash'],
'subject' => $base64EncryptedSubject,
'signature' => $base64Signature,
+ 'priority' => $priority,
];
}