[Ntfy] Only include action link if monitor url is defined #3274

This commit is contained in:
Philip Klostermann 2024-01-23 10:10:31 -05:00
parent 36196f632d
commit 20b69acde2
1 changed files with 7 additions and 4 deletions

View File

@ -54,14 +54,17 @@ class Ntfy extends NotificationProvider {
"priority": priority,
"title": monitorJSON.name + " " + status + " [Uptime-Kuma]",
"tags": tags,
"actions": [
};
if (monitorJSON.url) {
data.actions = [
{
"action": "view",
"label": "Open " + monitorJSON.name,
"url": monitorJSON.url,
}
]
};
},
];
}
if (notification.ntfyIcon) {
data.icon = notification.ntfyIcon;