diff --git a/WENI-CHANGELOG.md b/WENI-CHANGELOG.md index 41dcb9724..39142a6a2 100644 --- a/WENI-CHANGELOG.md +++ b/WENI-CHANGELOG.md @@ -1,3 +1,7 @@ +1.6.10-mailroom-7.1.22 +---------- + * Fix twilioflex panic on fetch media error + 1.6.9-mailroom-7.1.22 ---------- * Wenichats open room receiving defined custom fields of body is properly configured or all fields if not diff --git a/services/tickets/twilioflex/web.go b/services/tickets/twilioflex/web.go index 4192a009b..40fa2bd08 100644 --- a/services/tickets/twilioflex/web.go +++ b/services/tickets/twilioflex/web.go @@ -98,10 +98,10 @@ func handleEventCallback(ctx context.Context, rt *runtime.Runtime, r *http.Reque return err, http.StatusBadRequest, nil } file, err := tickets.FetchFile(mediaContent.Links.ContentDirectTemporary, nil) - file.ContentType = mediaContent.ContentType if err != nil { return errors.Wrapf(err, "error fetching ticket file '%s'", mediaContent.Links.ContentDirectTemporary), http.StatusBadRequest, nil } + file.ContentType = mediaContent.ContentType _, err = tickets.SendReply(ctx, rt, ticket, request.Body, []*tickets.File{file}) if err != nil { return err, http.StatusBadRequest, nil