From ce025df7b7fa24f8c95de7f518bc5466357256b9 Mon Sep 17 00:00:00 2001 From: Tudor Gradinaru Date: Thu, 23 Oct 2025 15:28:20 +0300 Subject: [PATCH] feat: Add monitor name to notification titles --- server/src/locales/en.json | 4 ++-- server/src/service/v1/infrastructure/notificationUtils.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/server/src/locales/en.json b/server/src/locales/en.json index 1345f84a8..373911a55 100755 --- a/server/src/locales/en.json +++ b/server/src/locales/en.json @@ -175,7 +175,7 @@ "checkmate": "Checkmate", "url": "URL", "unknown": "Unknown", - "uptimeAlert": "Uptime Alert: One of your monitors is back online", - "downtimeAlert": "Downtime Alert: One of your monitors went offline" + "uptimeAlert": "Uptime Alert: Your monitor {monitorName} is back online", + "downtimeAlert": "Downtime Alert: Your monitor {monitorName} went offline" } } diff --git a/server/src/service/v1/infrastructure/notificationUtils.js b/server/src/service/v1/infrastructure/notificationUtils.js index d6b92cc0e..879ad927c 100644 --- a/server/src/service/v1/infrastructure/notificationUtils.js +++ b/server/src/service/v1/infrastructure/notificationUtils.js @@ -74,7 +74,9 @@ class NotificationUtils { let discordMessageText = { embeds: [ { - title: status ? dn.uptimeAlert : dn.downtimeAlert, + title: status + ? dn.uptimeAlert.replace("{monitorName}", monitor?.name ?? dn.unknown) + : dn.downtimeAlert.replace("{monitorName}", monitor?.name ?? dn.unknown), color: status ? 5763719 : 15548997, fields: [