add URL to slack notification

pull/3541/head
Michał Wójcik 9 months ago
parent 183f8eedf9
commit 4377f575d1
No known key found for this signature in database
GPG Key ID: 6D108A166EAE5B01

@ -27,11 +27,6 @@ class Slack extends NotificationProvider {
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
let okMsg = "Sent Successfully.";
if (notification.slackchannelnotify) {
msg += " <!channel>";
}
try {
if (heartbeatJSON == null) {
let data = {
@ -58,7 +53,7 @@ class Slack extends NotificationProvider {
"type": "header",
"text": {
"type": "plain_text",
"text": textMsg,
"text": "Uptime Kuma Alert",
},
},
{
@ -67,10 +62,15 @@ class Slack extends NotificationProvider {
"type": "mrkdwn",
"text": "*Message*\n" + msg,
},
{
"type": "mrkdwn",
"text": `*Time (${heartbeatJSON["timezone"]})*\n${heartbeatJSON["localDateTime"]}`,
}],
{
"type": "mrkdwn",
"text": `*Time (${heartbeatJSON["timezone"]})*\n${heartbeatJSON["localDateTime"]}`,
},
{
"type": "mrkdwn",
"text": "*URL*\n" + monitorJSON.url,
}],
}
],
}

Loading…
Cancel
Save