From de572c595d606a3d79412bab7d350e8af493ec28 Mon Sep 17 00:00:00 2001 From: Valdnet <47037905+Valdnet@users.noreply.github.com> Date: Tue, 24 Aug 2021 09:29:45 +0200 Subject: [PATCH 1/2] High priority for the PhoneTrack app Added high priority for notifications for PhoneTrack. Notifications sent from this application are also important for users. The information it contains must be received very quickly in the event of exceeding the set zone or approaching two devices. Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com> --- lib/Push.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Push.php b/lib/Push.php index f9c0020a9..71ce0a7ff 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -416,6 +416,9 @@ protected function encryptAndSign(Key $userKey, array $device, int $id, INotific } elseif ($data['app'] === 'twofactor_nextcloud_notification') { $priority = 'high'; $type = 'alert'; + } elseif ($data['app'] === 'phonetrack') { + $priority = 'high'; + $type = 'alert'; } else { $priority = 'normal'; $type = 'alert'; From 12e04d55fd0a250673cc242cf7a86b67ef9f082c Mon Sep 17 00:00:00 2001 From: Valdnet <47037905+Valdnet@users.noreply.github.com> Date: Tue, 24 Aug 2021 16:34:56 +0200 Subject: [PATCH 2/2] Change elseif to or Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com> --- lib/Push.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Push.php b/lib/Push.php index 71ce0a7ff..203d0eb3b 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -413,10 +413,7 @@ protected function encryptAndSign(Key $userKey, array $device, int $id, INotific if ($isTalkNotification) { $priority = 'high'; $type = $data['type'] === 'call' ? 'voip' : 'alert'; - } elseif ($data['app'] === 'twofactor_nextcloud_notification') { - $priority = 'high'; - $type = 'alert'; - } elseif ($data['app'] === 'phonetrack') { + } elseif ($data['app'] === 'twofactor_nextcloud_notification' || $data['app'] === 'phonetrack') { $priority = 'high'; $type = 'alert'; } else {