mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-28 01:04:05 +00:00
Check for ping and port type in discord notifs
This commit is contained in:
parent
ce7d8c38c5
commit
0961c6d9b3
1 changed files with 11 additions and 8 deletions
|
@ -24,14 +24,17 @@ class Discord extends NotificationProvider {
|
||||||
|
|
||||||
let url;
|
let url;
|
||||||
|
|
||||||
if (monitorJSON["type"] === "port") {
|
switch (monitorJSON["type"]) {
|
||||||
url = monitorJSON["hostname"];
|
case "port":
|
||||||
if (monitorJSON["port"]) {
|
case "ping":
|
||||||
url += ":" + monitorJSON["port"];
|
url = monitorJSON["hostname"];
|
||||||
}
|
if (monitorJSON["port"]) {
|
||||||
|
url += ":" + monitorJSON["port"];
|
||||||
} else {
|
}
|
||||||
url = monitorJSON["url"];
|
break;
|
||||||
|
default:
|
||||||
|
url = monitorJSON["url"];
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If heartbeatJSON is not null, we go into the normal alerting loop.
|
// If heartbeatJSON is not null, we go into the normal alerting loop.
|
||||||
|
|
Loading…
Reference in a new issue