From 1698ec2eb38e5c28a375617d0199e324c256d122 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Fri, 31 May 2024 20:01:38 +0200 Subject: [PATCH] EventManager: fix adding ObjectDataString for provider events Signed-off-by: Nicola Murino --- internal/dataprovider/eventrule.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/dataprovider/eventrule.go b/internal/dataprovider/eventrule.go index 2780860c..7e827cc9 100644 --- a/internal/dataprovider/eventrule.go +++ b/internal/dataprovider/eventrule.go @@ -398,11 +398,11 @@ func (c *EventActionHTTPConfig) GetContext() (context.Context, context.CancelFun // HasObjectData returns true if the {{ObjectData}} placeholder is defined func (c *EventActionHTTPConfig) HasObjectData() bool { - if strings.Contains(c.Body, "{{ObjectData}}") { + if strings.Contains(c.Body, "{{ObjectData}}") || strings.Contains(c.Body, "{{ObjectDataString}}") { return true } for _, part := range c.Parts { - if strings.Contains(part.Body, "{{ObjectData}}") { + if strings.Contains(part.Body, "{{ObjectData}}") || strings.Contains(part.Body, "{{ObjectDataString}}") { return true } }