From e44cbf376f989af82f30909f9cd7d2b13f094d2b Mon Sep 17 00:00:00 2001 From: Skorpios Date: Tue, 4 Feb 2025 14:50:16 -0800 Subject: [PATCH] Stop execution in the event of an unwanted platform. --- Server/service/notificationService.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Server/service/notificationService.js b/Server/service/notificationService.js index 05adbb3ff..a8707dc4d 100644 --- a/Server/service/notificationService.js +++ b/Server/service/notificationService.js @@ -36,6 +36,14 @@ class NotificationService { text: `Monitor ${monitor.name} is ${status ? "up" : "down"}. URL: ${monitor.url}` }; url = `${TELEGRAM_API_BASE_URL}${botToken}/sendMessage`; + } else { + this.logger.warn({ + message: `Unsupported platform: ${platform}`, + service: this.SERVICE_NAME, + method: 'sendWebhookNotification', + platform + }); + return false; } try {