mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-04 17:23:21 +00:00
refactor: use extractAddress() method for monitor address
Address review feedback from CommanderStorm to use the inherited extractAddress() method instead of directly accessing monitorJSON["url"]. This properly handles different monitor types (ping, port, dns, etc.).
This commit is contained in:
@@ -80,11 +80,12 @@ class GoogleChat extends NotificationProvider {
|
||||
});
|
||||
}
|
||||
|
||||
// add monitor URL if available
|
||||
if (monitorJSON && monitorJSON["url"]) {
|
||||
// add monitor address if available
|
||||
const address = this.extractAddress(monitorJSON);
|
||||
if (address) {
|
||||
sectionWidgets.push({
|
||||
textParagraph: {
|
||||
text: `<b>URL:</b>\n<a href="${monitorJSON["url"]}">${monitorJSON["url"]}</a>`,
|
||||
text: `<b>Address:</b>\n${address}`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user