diff --git a/services/tickets/zendesk/service.go b/services/tickets/zendesk/service.go index 0ec8420f8..1680f45d7 100644 --- a/services/tickets/zendesk/service.go +++ b/services/tickets/zendesk/service.go @@ -4,6 +4,7 @@ import ( "fmt" "net/http" "net/url" + "path" "reflect" "strings" @@ -151,6 +152,14 @@ func (s *service) Forward(ticket *models.Ticket, msgUUID flows.MsgUUID, text str return errors.Wrap(err, "error converting attachments") } + if text == "" && len(fileURLs) > 0 { + parsedURL, err := url.Parse(fileURLs[0]) + if err != nil { + return err + } + text = path.Base(parsedURL.Path) + } + msg := &ExternalResource{ ExternalID: string(msgUUID), Message: text,