mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-26 22:19:43 -08:00
Add monitor name context to Slack fallback text.
The text block of a slack notification payload is used for mobile devices and plain text previews. This change allows slack users to see the name of the failing service without having to open up Slack to read the entire message.
This commit is contained in:
parent
e2dbacb383
commit
655ccc86b9
|
@ -39,8 +39,9 @@ class Slack extends NotificationProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
const time = heartbeatJSON["time"];
|
const time = heartbeatJSON["time"];
|
||||||
|
const textMsg = "Uptime Kuma Alert";
|
||||||
let data = {
|
let data = {
|
||||||
"text": "Uptime Kuma Alert",
|
"text": monitorJSON ? textMsg + `: ${monitorJSON.name}` : textMsg,
|
||||||
"channel": notification.slackchannel,
|
"channel": notification.slackchannel,
|
||||||
"username": notification.slackusername,
|
"username": notification.slackusername,
|
||||||
"icon_emoji": notification.slackiconemo,
|
"icon_emoji": notification.slackiconemo,
|
||||||
|
|
Loading…
Reference in a new issue