Skip to content

Commit

Permalink
[Ntfy] Only include action link if monitor url is defined #3274 (#4411)
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm authored Mar 5, 2024
2 parents 574705a + 95125cc commit da92400
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions server/notification-providers/ntfy.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,17 @@ class Ntfy extends NotificationProvider {
"priority": priority,
"title": monitorJSON.name + " " + status + " [Uptime-Kuma]",
"tags": tags,
"actions": [
};

if (monitorJSON.url && monitorJSON.url !== "https://") {
data.actions = [
{
"action": "view",
"label": "Open " + monitorJSON.name,
"url": monitorJSON.url,
}
]
};
},
];
}

if (notification.ntfyIcon) {
data.icon = notification.ntfyIcon;
Expand Down

0 comments on commit da92400

Please sign in to comment.