mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
Conditionally add service url
This commit is contained in:
parent
af230ba5fb
commit
8b82520d3d
1 changed files with 6 additions and 0 deletions
|
@ -33,11 +33,17 @@ class Discord extends NotificationProvider {
|
||||||
return okMsg;
|
return okMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const address = this.extractAddress(monitorJSON);
|
||||||
|
|
||||||
const embedFields = [
|
const embedFields = [
|
||||||
{
|
{
|
||||||
name: "Service Name",
|
name: "Service Name",
|
||||||
value: monitorJSON["name"],
|
value: monitorJSON["name"],
|
||||||
},
|
},
|
||||||
|
...((address !== "" && address !== monitorJSON["hostname"]) ? [{
|
||||||
|
name: "Service URL",
|
||||||
|
value: address
|
||||||
|
}] : []),
|
||||||
{
|
{
|
||||||
name: `Time (${heartbeatJSON["timezone"]})`,
|
name: `Time (${heartbeatJSON["timezone"]})`,
|
||||||
value: heartbeatJSON["localDateTime"],
|
value: heartbeatJSON["localDateTime"],
|
||||||
|
|
Loading…
Reference in a new issue