From 012eaaf8cbbfffca1e744c3f3867f5a70613f3f7 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: 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 4bb6f66..89a345c 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -422,6 +422,9 @@ class Push { } elseif ($data['app'] === 'twofactor_nextcloud_notification') { $priority = 'high'; $type = 'alert'; + } elseif ($data['app'] === 'phonetrack') { + $priority = 'high'; + $type = 'alert'; } else { $priority = 'normal'; $type = 'alert'; -- cgit v1.2.3 From 683752bd5a29b330684be44fd55a626a34d47d26 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: 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 89a345c..af3d0a2 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -419,10 +419,7 @@ class Push { 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 { -- cgit v1.2.3