mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-20 16:50:37 +08:00
ntfy.sh separate down priority (#5893)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
committed by
GitHub
parent
c46772dafc
commit
f27811c394
@@ -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";
|
||||
|
Reference in New Issue
Block a user