From fd9f12bab220d1c9e63ef368486dfd42c831e59b Mon Sep 17 00:00:00 2001 From: uros Date: Tue, 20 Dec 2022 17:48:32 +0100 Subject: [PATCH] Overriding defaultTitle with subject for SNS notifications - condition fix Signed-off-by: uros --- .../alerting/util/destinationmigration/NotificationApiUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/NotificationApiUtils.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/NotificationApiUtils.kt index a0232c016..7b4dc8abf 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/NotificationApiUtils.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/destinationmigration/NotificationApiUtils.kt @@ -143,7 +143,7 @@ suspend fun NotificationConfigInfo.sendNotification(client: Client, title: Strin */ fun NotificationConfigInfo.getTitle(subject: String?): String { val defaultTitle = "Alerting-Notification Action" - if (this.notificationConfig.configType == ConfigType.EMAIL || this.notificationConfig.configType == ConfigType.EMAIL) { + if (this.notificationConfig.configType == ConfigType.EMAIL || this.notificationConfig.configType == ConfigType.SNS) { return if (subject.isNullOrEmpty()) defaultTitle else subject }