EventManager: fix adding ObjectDataString for provider events

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2024-05-31 20:01:38 +02:00
parent 3efff2ea8a
commit a215fad41a
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -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
}
}