From 61a8f026e929155258478a4840257ceca41bf60e 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 4bb6f6690..89a345cfb 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -422,6 +422,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 7e7ca3f4d70eec0f4b4df6e9ee56f2faec15d4c8 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 89a345cfb..af3d0a250 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -419,10 +419,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 {