mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
Add space to pushbullet and lunasea notifications
Start changes regarding standardization of notification messages
This commit is contained in:
parent
f23ecef636
commit
532ad3044c
1 changed files with 4 additions and 4 deletions
|
@ -491,7 +491,7 @@ class Notification {
|
||||||
|
|
||||||
if (heartbeatJSON["status"] == 0) {
|
if (heartbeatJSON["status"] == 0) {
|
||||||
let downdata = {
|
let downdata = {
|
||||||
"title": "UptimeKuma Alert:" + monitorJSON["name"],
|
"title": "UptimeKuma Alert: " + monitorJSON["name"],
|
||||||
"body": "[🔴 Down]" + heartbeatJSON["msg"] + "\nTime (UTC):" + heartbeatJSON["time"],
|
"body": "[🔴 Down]" + heartbeatJSON["msg"] + "\nTime (UTC):" + heartbeatJSON["time"],
|
||||||
}
|
}
|
||||||
await axios.post(lunaseadevice, downdata)
|
await axios.post(lunaseadevice, downdata)
|
||||||
|
@ -500,7 +500,7 @@ class Notification {
|
||||||
|
|
||||||
if (heartbeatJSON["status"] == 1) {
|
if (heartbeatJSON["status"] == 1) {
|
||||||
let updata = {
|
let updata = {
|
||||||
"title": "UptimeKuma Alert:" + monitorJSON["name"],
|
"title": "UptimeKuma Alert: " + monitorJSON["name"],
|
||||||
"body": "[✅ Up]" + heartbeatJSON["msg"] + "\nTime (UTC):" + heartbeatJSON["time"],
|
"body": "[✅ Up]" + heartbeatJSON["msg"] + "\nTime (UTC):" + heartbeatJSON["time"],
|
||||||
}
|
}
|
||||||
await axios.post(lunaseadevice, updata)
|
await axios.post(lunaseadevice, updata)
|
||||||
|
@ -530,14 +530,14 @@ class Notification {
|
||||||
} else if (heartbeatJSON["status"] == 0) {
|
} else if (heartbeatJSON["status"] == 0) {
|
||||||
let downdata = {
|
let downdata = {
|
||||||
"type": "note",
|
"type": "note",
|
||||||
"title": "UptimeKuma Alert:" + monitorJSON["name"],
|
"title": "UptimeKuma Alert: " + monitorJSON["name"],
|
||||||
"body": "[🔴 Down]" + heartbeatJSON["msg"] + "\nTime (UTC):" + heartbeatJSON["time"],
|
"body": "[🔴 Down]" + heartbeatJSON["msg"] + "\nTime (UTC):" + heartbeatJSON["time"],
|
||||||
}
|
}
|
||||||
await axios.post(pushbulletUrl, downdata, config)
|
await axios.post(pushbulletUrl, downdata, config)
|
||||||
} else if (heartbeatJSON["status"] == 1) {
|
} else if (heartbeatJSON["status"] == 1) {
|
||||||
let updata = {
|
let updata = {
|
||||||
"type": "note",
|
"type": "note",
|
||||||
"title": "UptimeKuma Alert:" + monitorJSON["name"],
|
"title": "UptimeKuma Alert: " + monitorJSON["name"],
|
||||||
"body": "[✅ Up]" + heartbeatJSON["msg"] + "\nTime (UTC):" + heartbeatJSON["time"],
|
"body": "[✅ Up]" + heartbeatJSON["msg"] + "\nTime (UTC):" + heartbeatJSON["time"],
|
||||||
}
|
}
|
||||||
await axios.post(pushbulletUrl, updata, config)
|
await axios.post(pushbulletUrl, updata, config)
|
||||||
|
|
Loading…
Reference in a new issue