mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-20 12:27:29 +08:00
fix: send slack message throw 400 invalid_attachments (#6014)
This commit is contained in:
@@ -2,6 +2,7 @@ const NotificationProvider = require("./notification-provider");
|
||||
const axios = require("axios");
|
||||
const { setSettings, setting } = require("../util-server");
|
||||
const { getMonitorRelativeURL, UP, log } = require("../../src/util");
|
||||
const isUrl = require("is-url");
|
||||
|
||||
class Slack extends NotificationProvider {
|
||||
name = "slack";
|
||||
@@ -49,7 +50,7 @@ class Slack extends NotificationProvider {
|
||||
}
|
||||
|
||||
const address = this.extractAddress(monitorJSON);
|
||||
if (address) {
|
||||
if (isUrl(address)) {
|
||||
try {
|
||||
actions.push({
|
||||
"type": "button",
|
||||
|
Reference in New Issue
Block a user