mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-18 23:34:04 +02:00
Default downPriority to priority+1 with a max of 5 where not set
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
8cae54c559
commit
6f63175244
1 changed files with 2 additions and 1 deletions
|
@ -37,7 +37,8 @@ class Ntfy extends NotificationProvider {
|
||||||
let tags = [];
|
let tags = [];
|
||||||
let status = "unknown";
|
let status = "unknown";
|
||||||
let priority = notification.ntfyPriority || 4;
|
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 ("status" in heartbeatJSON) {
|
||||||
if (heartbeatJSON.status === DOWN) {
|
if (heartbeatJSON.status === DOWN) {
|
||||||
tags = [ "red_circle" ];
|
tags = [ "red_circle" ];
|
||||||
|
|
Loading…
Add table
Reference in a new issue