mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-09 23:24:07 -08:00
PagerTree Notification - Send msg when heartbeatJSON null
This commit is contained in:
parent
1c0174c319
commit
5e1489a6ed
|
@ -13,8 +13,8 @@ class PagerTree extends NotificationProvider {
|
|||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||
try {
|
||||
if (heartbeatJSON == null) {
|
||||
const title = "[Test] Uptime Kuma Alert";
|
||||
return this.postNotification(notification, title, monitorJSON, heartbeatJSON);
|
||||
// general messages
|
||||
return this.postNotification(notification, msg, monitorJSON, heartbeatJSON);
|
||||
}
|
||||
|
||||
if (heartbeatJSON.status === UP && notification.pagertreeAutoResolve === "resolve") {
|
||||
|
@ -64,7 +64,7 @@ class PagerTree extends NotificationProvider {
|
|||
headers: { "Content-Type": "application/json" },
|
||||
data: {
|
||||
event_type: eventAction,
|
||||
id: heartbeatJSON?.monitorID || "uptime-kuma-test",
|
||||
id: heartbeatJSON?.monitorID || "uptime-kuma",
|
||||
title: title,
|
||||
urgency: notification.pagertreeUrgency,
|
||||
heartbeat: heartbeatJSON,
|
||||
|
|
Loading…
Reference in a new issue