mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-10-26 16:49:20 +08:00
Undo parm changes
This commit is contained in:
@@ -270,9 +270,18 @@ class Monitor extends BeanModel {
|
||||
this.id,
|
||||
])
|
||||
|
||||
let text;
|
||||
if (bean.status === UP) {
|
||||
text = "✅ Up"
|
||||
} else {
|
||||
text = "🔴 Down"
|
||||
}
|
||||
|
||||
let msg = `[${this.name}] [${text}] ${bean.msg}`;
|
||||
|
||||
for (let notification of notificationList) {
|
||||
try {
|
||||
await Notification.send(JSON.parse(notification.config), this.name, await this.toJSON(), bean.toJSON())
|
||||
await Notification.send(JSON.parse(notification.config), msg, await this.toJSON(), bean.toJSON())
|
||||
} catch (e) {
|
||||
console.error("Cannot send notification to " + notification.name);
|
||||
console.log(e);
|
||||
|
||||
Reference in New Issue
Block a user