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",
|
"checkmate": "Checkmate",
|
||||||
"url": "URL",
|
"url": "URL",
|
||||||
"unknown": "Unknown",
|
"unknown": "Unknown",
|
||||||
"uptimeAlert": "Uptime Alert: One of your monitors is back online",
|
"uptimeAlert": "Uptime Alert: Your monitor {monitorName} is back online",
|
||||||
"downtimeAlert": "Downtime Alert: One of your monitors went offline"
|
"downtimeAlert": "Downtime Alert: Your monitor {monitorName} went offline"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,9 @@ class NotificationUtils {
|
|||||||
let discordMessageText = {
|
let discordMessageText = {
|
||||||
embeds: [
|
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,
|
color: status ? 5763719 : 15548997,
|
||||||
|
|
||||||
fields: [
|
fields: [
|
||||||
|
|||||||
Reference in new issue
Block a user