diff --git a/services/tickets/zendesk/service.go b/services/tickets/zendesk/service.go index 9fce039f4..d52c63bdc 100644 --- a/services/tickets/zendesk/service.go +++ b/services/tickets/zendesk/service.go @@ -318,7 +318,7 @@ func (s *service) convertAttachments(attachments []utils.Attachment) ([]string, path := strings.TrimPrefix(u.Path, prefix) path = strings.TrimPrefix(path, "/") - fileURLs[i] = "file/" + path + fileURLs[i] = "api/v2/file/" + path } return fileURLs, nil } diff --git a/services/tickets/zendesk/testdata/TestOpenAndForward_forward_message.snap b/services/tickets/zendesk/testdata/TestOpenAndForward_forward_message.snap index 6207acfcc..a7bff213c 100644 --- a/services/tickets/zendesk/testdata/TestOpenAndForward_forward_message.snap +++ b/services/tickets/zendesk/testdata/TestOpenAndForward_forward_message.snap @@ -1,9 +1,9 @@ POST /api/v2/any_channel/push.json HTTP/1.1 Host: nyaruka.zendesk.com User-Agent: Go-http-client/1.1 -Content-Length: 409 +Content-Length: 416 Authorization: Bearer **************** Content-Type: application/json Accept-Encoding: gzip -{"instance_push_id":"1234-abcd","request_id":"sesame:1570461700000000000","external_resources":[{"external_id":"ca5607f0-cba8-4c94-9cd5-c4fbc24aa767","message":"It's urgent","thread_id":"59d74b86-3e2f-4a93-aece-b05d2fdcde0c","created_at":"2019-10-07T15:21:39Z","author":{"external_id":"6393abc0-283d-4c9b-a1b3-641a035c34bf","name":"Cathy"},"allow_channelback":true,"file_urls":["file/0123/attachment1.jpg"]}]} \ No newline at end of file +{"instance_push_id":"1234-abcd","request_id":"sesame:1570461700000000000","external_resources":[{"external_id":"ca5607f0-cba8-4c94-9cd5-c4fbc24aa767","message":"It's urgent","thread_id":"59d74b86-3e2f-4a93-aece-b05d2fdcde0c","created_at":"2019-10-07T15:21:39Z","author":{"external_id":"6393abc0-283d-4c9b-a1b3-641a035c34bf","name":"Cathy"},"allow_channelback":true,"file_urls":["api/v2/file/0123/attachment1.jpg"]}]} \ No newline at end of file