Skip to content

Commit

Permalink
fix(generic-eventsource): Set payload when jsonbody is not true. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
whynowy authored Nov 4, 2020
1 parent 6abeb33 commit c446bad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eventsources/sources/generic/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ func (el *EventListener) StartListening(ctx context.Context, dispatch func([]byt
}
if el.GenericEventSource.JSONBody {
eventData.Body = (*json.RawMessage)(&event.Payload)
} else {
eventData.Body = event.Payload
}
eventBytes, err := json.Marshal(eventData)
if err != nil {
Expand Down

0 comments on commit c446bad

Please sign in to comment.