inline the down prio

This commit is contained in:
Frank Elsinga 2025-06-10 18:57:29 +02:00 committed by GitHub
parent 6f63175244
commit dd29261a0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,7 +43,8 @@ class Ntfy extends NotificationProvider {
if (heartbeatJSON.status === DOWN) {
tags = [ "red_circle" ];
status = "Down";
priority = downPriority;
// defaults to max(priority + 1, 5)
priority = notification.ntfyPriorityDown || (priority === 5 ? priority : priority + 1);
} else if (heartbeatJSON["status"] === UP) {
tags = [ "green_circle" ];
status = "Up";