mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-09-15 07:56:58 +08:00
fix discord notification appended port unexpectedly
This commit is contained in:
@@ -96,9 +96,16 @@ class Notification {
|
|||||||
return okMsg;
|
return okMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
let url = monitorJSON["url"] === "https://" ? monitorJSON["hostname"] : monitorJSON["url"]
|
let url;
|
||||||
if (monitorJSON["port"]) {
|
|
||||||
url += ":" + monitorJSON[port];
|
if (monitorJSON["type"] === "port") {
|
||||||
|
url = monitorJSON["hostname"];
|
||||||
|
if (monitorJSON["port"]) {
|
||||||
|
url += ":" + monitorJSON["port"];
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
url = monitorJSON["url"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// If heartbeatJSON is not null, we go into the normal alerting loop.
|
// If heartbeatJSON is not null, we go into the normal alerting loop.
|
||||||
|
Reference in New Issue
Block a user