From 6f63175244172790698bb8407c2c6888b187d4e6 Mon Sep 17 00:00:00 2001 From: Andrea Mastellone Date: Mon, 9 Jun 2025 18:32:19 -0400 Subject: [PATCH] Default downPriority to priority+1 with a max of 5 where not set Co-authored-by: Frank Elsinga --- server/notification-providers/ntfy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/notification-providers/ntfy.js b/server/notification-providers/ntfy.js index f4b2d1937..3eccb34e1 100644 --- a/server/notification-providers/ntfy.js +++ b/server/notification-providers/ntfy.js @@ -37,7 +37,8 @@ class Ntfy extends NotificationProvider { let tags = []; let status = "unknown"; let priority = notification.ntfyPriority || 4; - let downPriority = notification.ntfyPriorityDown || 5; + // defaults to max(priority + 1, 5) + let downPriority = notification.ntfyPriorityDown || (priority === 5 ? priority : priority + 1); if ("status" in heartbeatJSON) { if (heartbeatJSON.status === DOWN) { tags = [ "red_circle" ];