Merge pull request #3036 from TudorGR/feature/add-monitor-name-to-notification-title
feat: Add monitor name to notification titles
This commit is contained in:
2 files changed
+5
-3
No files matched your search
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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: [
|
||||
|
||||
Reference in new issue
Block a user