From 4cad39740ed8837d54e4582fe743cb956a4af08d Mon Sep 17 00:00:00 2001 From: mkdev11 Date: Tue, 6 Jan 2026 01:06:37 +0200 Subject: [PATCH] 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.). --- server/notification-providers/google-chat.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/notification-providers/google-chat.js b/server/notification-providers/google-chat.js index c05830d93..b9614d4a9 100644 --- a/server/notification-providers/google-chat.js +++ b/server/notification-providers/google-chat.js @@ -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: `URL:\n${monitorJSON["url"]}`, + text: `Address:\n${address}`, }, }); }