diff --git a/server/notification-providers/signal.js b/server/notification-providers/signal.js index 5dd521bdd..badabdff7 100644 --- a/server/notification-providers/signal.js +++ b/server/notification-providers/signal.js @@ -11,8 +11,14 @@ class Signal extends NotificationProvider { const okMsg = "Sent Successfully."; try { + let message = msg; + + if (notification.signalUseTemplate) { + message = await this.renderTemplate(notification.signalTemplate, msg, monitorJSON, heartbeatJSON); + } + let data = { - message: msg, + message, number: notification.signalNumber, recipients: notification.signalRecipients.replace(/\s/g, "").split(","), }; diff --git a/src/components/notifications/Signal.vue b/src/components/notifications/Signal.vue index 374e0d5ad..1535b4c67 100644 --- a/src/components/notifications/Signal.vue +++ b/src/components/notifications/Signal.vue @@ -52,4 +52,48 @@

+ +
+
+ + +
+ +
+ {{ $t("signalUseTemplateDescription") }} +
+
+ + + + diff --git a/src/lang/en.json b/src/lang/en.json index 71a6ee141..5ec8c7dd6 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -863,6 +863,8 @@ "Remove domain": "Remove domain '{0}'", "Icon Emoji": "Icon Emoji", "signalImportant": "IMPORTANT: You cannot mix groups and numbers in recipients!", + "signalUseTemplate": "Use custom message template", + "signalUseTemplateDescription": "If enabled, the message will be sent using a custom template. You can use Liquid templating to customize the notification format.", "aboutWebhooks": "More info about Webhooks on: {0}", "aboutJiraCloudId": "More info about Jira Cloud ID: {0}", "see Jira Cloud Docs": "see Jira Cloud Docs",