Conditionally add service url

pull/5181/head
Dj Isaac 2 months ago
parent af230ba5fb
commit 8b82520d3d
No known key found for this signature in database

@ -33,11 +33,17 @@ class Discord extends NotificationProvider {
return okMsg;
}
const address = this.extractAddress(monitorJSON);
const embedFields = [
{
name: "Service Name",
value: monitorJSON["name"],
},
...((address !== "" && address !== monitorJSON["hostname"]) ? [{
name: "Service URL",
value: address
}] : []),
{
name: `Time (${heartbeatJSON["timezone"]})`,
value: heartbeatJSON["localDateTime"],

Loading…
Cancel
Save