Adds name + status + message to slack notification

This commit is contained in:
Brayan Lozano 2023-02-07 21:18:26 -05:00
parent e241728419
commit 727acb32bf
No known key found for this signature in database
GPG key ID: 7A67A99A45A66D84

View file

@ -42,7 +42,7 @@ class Slack extends NotificationProvider {
const time = heartbeatJSON["time"]; const time = heartbeatJSON["time"];
const textMsg = "Uptime Kuma Alert"; const textMsg = "Uptime Kuma Alert";
let data = { let data = {
"text": monitorJSON ? textMsg + `: ${monitorJSON.name}` : textMsg, "text": monitorJSON ? `${textMsg}\n${msg}` : textMsg,
"channel": notification.slackchannel, "channel": notification.slackchannel,
"username": notification.slackusername, "username": notification.slackusername,
"icon_emoji": notification.slackiconemo, "icon_emoji": notification.slackiconemo,