mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-12 16:44:12 -08:00
Fix: Resolve notice title definition issue and add newline between title and content in notification (#5166)
This commit is contained in:
parent
e773e454e9
commit
6476e58907
|
@ -32,20 +32,17 @@ class WeCom extends NotificationProvider {
|
|||
* @returns {object} Message
|
||||
*/
|
||||
composeMessage(heartbeatJSON, msg) {
|
||||
let title;
|
||||
let title = "UptimeKuma Message";
|
||||
if (msg != null && heartbeatJSON != null && heartbeatJSON["status"] === UP) {
|
||||
title = "UptimeKuma Monitor Up";
|
||||
}
|
||||
if (msg != null && heartbeatJSON != null && heartbeatJSON["status"] === DOWN) {
|
||||
title = "UptimeKuma Monitor Down";
|
||||
}
|
||||
if (msg != null) {
|
||||
title = "UptimeKuma Message";
|
||||
}
|
||||
return {
|
||||
msgtype: "text",
|
||||
text: {
|
||||
content: title + msg
|
||||
content: title + "\n" + msg
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue