From 62a6b7798fb6e8f0e891721aee283475c3ab90e8 Mon Sep 17 00:00:00 2001 From: Ievgen Sorokopud Date: Tue, 25 Apr 2023 20:57:16 +0200 Subject: [PATCH] =?UTF-8?q?Call=20formatAlert=20before=20passing=20alert?= =?UTF-8?q?=20to=20=E2=80=9Cfor=20each=20alert=E2=80=9D=20context?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/utils/create_persistence_rule_type_wrapper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_wrapper.ts b/x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_wrapper.ts index 4ad30f00835d4..2f17221f61cce 100644 --- a/x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_wrapper.ts +++ b/x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_wrapper.ts @@ -193,7 +193,7 @@ export const createPersistenceRuleTypeWrapper: CreatePersistenceRuleTypeWrapper start: Date.parse(alert[TIMESTAMP]), end: Date.parse(alert[TIMESTAMP]), }), - alerts: [alert], + alerts: [formatAlert?.(alert) ?? alert], }) ); @@ -385,7 +385,7 @@ export const createPersistenceRuleTypeWrapper: CreatePersistenceRuleTypeWrapper start: Date.parse(alert[TIMESTAMP]), end: Date.parse(alert[TIMESTAMP]), }), - alerts: [alert], + alerts: [formatAlert?.(alert) ?? alert], }) );