inlined `params`

pull/4516/head
Frank Elsinga 3 months ago committed by GitHub
parent 45a56d4131
commit cd0a99de96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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,
},
};
}
/**

Loading…
Cancel
Save