ntfy.sh separate down priority (#5893)

Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
Andrea Mastellone
2025-06-10 19:41:09 -04:00
committed by GitHub
parent c46772dafc
commit f27811c394
3 changed files with 18 additions and 4 deletions

View File

@@ -41,8 +41,8 @@ class Ntfy extends NotificationProvider {
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;
// defaults to max(priority + 1, 5)
priority = notification.ntfyPriorityDown || (priority === 5 ? priority : priority + 1);
} else if (heartbeatJSON["status"] === UP) {
tags = [ "green_circle" ];
status = "Up";