Merge pull request #3080 from duanearnett/feature/add-channel-notification-for-slack

Adds configurable @channel notification for Slack integrations
This commit is contained in:
Louis Lam
2023-07-15 18:41:17 +08:00
committed by GitHub
3 changed files with 16 additions and 1 deletions

View File

@@ -27,6 +27,11 @@ 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 = {
@@ -53,7 +58,7 @@ class Slack extends NotificationProvider {
"type": "header",
"text": {
"type": "plain_text",
"text": "Uptime Kuma Alert",
"text": textMsg,
},
},
{