Merge pull request #2736 from blozano824/add-status-to-slack-notification

Adds name + status + message to Slack notification
This commit is contained in:
Louis Lam 2023-02-24 23:54:31 +08:00 committed by GitHub
commit e873fea86d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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": `${textMsg}\n${msg}`,
"channel": notification.slackchannel, "channel": notification.slackchannel,
"username": notification.slackusername, "username": notification.slackusername,
"icon_emoji": notification.slackiconemo, "icon_emoji": notification.slackiconemo,