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:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2018-07-11 14:19:05 +0300
committerGitHub <noreply@github.com>2018-07-11 14:19:05 +0300
commitf88affe59987fe4fe526efe55a8f097cccf432d9 (patch)
treeea1e02b354021c54bb4a5a8f89cff91968ad50cb
parent9468694775a04fb1c7fa3ff65c77b3d6c58a147a (diff)
parent0f0cb14fcb9646cae4a5104a0cda3f53946a8a98 (diff)
Merge pull request #140 from nextcloud/backport/134/talk-high-priorityv13.0.5RC2v13.0.5RC1
[stable13] Add prioritization for Talk
-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,
];
}