diff --git a/core/tasks/handler/worker.go b/core/tasks/handler/worker.go index ebed69884..5cd574a76 100644 --- a/core/tasks/handler/worker.go +++ b/core/tasks/handler/worker.go @@ -767,16 +767,13 @@ func handleTicketEvent(ctx context.Context, rt *runtime.Runtime, event *models.T var params *types.XObject if event.Note() != "" { - note := struct { - Event string `json:"event"` - ID int `json:"id"` - Status string `json:"status"` - }{} - err := json.Unmarshal([]byte(event.Note()), ¬e) + var values map[string]interface{} + + err := json.Unmarshal([]byte(event.Note()), &values) if err != nil { log.WithError(err).Error("unable to unmarshal note from ticket event") } - asJSON, err := json.Marshal(note) + asJSON, err := json.Marshal(values) if err != nil { log.WithError(err).Error("unable to marshal note from ticket event") } diff --git a/services/tickets/rocketchat/web.go b/services/tickets/rocketchat/web.go index 042f9f1aa..41474a430 100644 --- a/services/tickets/rocketchat/web.go +++ b/services/tickets/rocketchat/web.go @@ -98,7 +98,8 @@ func handleEventCallback(ctx context.Context, rt *runtime.Runtime, r *http.Reque _, err = tickets.SendReply(ctx, rt, ticket, data.Text, files) case "close-room": - err = tickets.Close(ctx, rt, oa, ticket, false, l, "") + requestJSON, _ := json.Marshal(request) + err = tickets.Close(ctx, rt, oa, ticket, false, l, string(requestJSON)) default: err = errors.New("invalid event type")