diff --git a/server/notification-providers/ntfy.js b/server/notification-providers/ntfy.js index ad1d39f8f..ac3fd9db1 100644 --- a/server/notification-providers/ntfy.js +++ b/server/notification-providers/ntfy.js @@ -37,12 +37,12 @@ class Ntfy extends NotificationProvider { let tags = []; let status = "unknown"; let priority = notification.ntfyPriority || 4; + let downPriority = notification.ntfyPriorityDown || 5; if ("status" in heartbeatJSON) { if (heartbeatJSON.status === DOWN) { tags = [ "red_circle" ]; status = "Down"; - // if priority is not 5, increase priority for down alerts - priority = priority === 5 ? priority : priority + 1; + priority = downPriority } else if (heartbeatJSON["status"] === UP) { tags = [ "green_circle" ]; status = "Up"; diff --git a/src/components/notifications/Ntfy.vue b/src/components/notifications/Ntfy.vue index ba94451a2..3de807d1e 100644 --- a/src/components/notifications/Ntfy.vue +++ b/src/components/notifications/Ntfy.vue @@ -13,13 +13,20 @@
+
{{ $t("ntfyPriorityHelptextAllEvents") }}
+DOWN
+ {{ $parent.notification.ntfyPriority }}
+ {{ $parent.notification.ntfyPriorityDown }}
+ DOWN
- {{ $parent.notification.ntfyPriority + 1 }}
+ {{ $parent.notification.ntfyPriorityDown }}