diff --git a/server/notification-providers/wecom.js b/server/notification-providers/wecom.js index 3048af07..25bc91de 100755 --- a/server/notification-providers/wecom.js +++ b/server/notification-providers/wecom.js @@ -36,9 +36,8 @@ class WeCom extends NotificationProvider { * @returns {object} Message */ composeMessage(heartbeatJSON, monitorJSON, msg) { - let params = {}; if (heartbeatJSON != null) { - params = { + return { msgtype: "markdown", markdown: { content: `## [${this.statusToString( @@ -50,15 +49,13 @@ class WeCom extends NotificationProvider { }`, }, }; - } else { - params = { - msgtype: "text", - text: { - content: msg, - }, - }; } - return params; + return { + msgtype: "text", + text: { + content: msg, + }, + }; } /**