forked from rapidpro/mailroom
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for incoming attachments on ticketing services (WIP)
- Loading branch information
1 parent
0a6917e
commit 0c07ae3
Showing
15 changed files
with
148 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
services/tickets/mailgun/testdata/TestSendMessage_mailgun_request.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
POST /v3/tickets.rapidpro.io/messages HTTP/1.1 | ||
Host: api.mailgun.net | ||
User-Agent: Go-http-client/1.1 | ||
Content-Length: 915 | ||
Authorization: Basic YXBpOjEyMzQ1Njc4OQ== | ||
Content-Type: multipart/form-data; boundary=9688d21d-95aa-4bed-afc7-f31b35731a3d | ||
Accept-Encoding: gzip | ||
|
||
--9688d21d-95aa-4bed-afc7-f31b35731a3d | ||
Content-Disposition: form-data; name="from" | ||
|
||
Bob <ticket+12446@tickets.rapidpro.io> | ||
--9688d21d-95aa-4bed-afc7-f31b35731a3d | ||
Content-Disposition: form-data; name="to" | ||
|
||
support@acme.com | ||
--9688d21d-95aa-4bed-afc7-f31b35731a3d | ||
Content-Disposition: form-data; name="subject" | ||
|
||
Need help | ||
--9688d21d-95aa-4bed-afc7-f31b35731a3d | ||
Content-Disposition: form-data; name="text" | ||
|
||
Where are my cookies? | ||
--9688d21d-95aa-4bed-afc7-f31b35731a3d | ||
Content-Disposition: form-data; name="attachment"; filename="test.jpg" | ||
Content-Type: application/octet-stream | ||
|
||
IMANIMAGE | ||
--9688d21d-95aa-4bed-afc7-f31b35731a3d | ||
Content-Disposition: form-data; name="attachment"; filename="test.mp4" | ||
Content-Type: application/octet-stream | ||
|
||
IMAVIDEO | ||
--9688d21d-95aa-4bed-afc7-f31b35731a3d | ||
Content-Disposition: form-data; name="h:In-Reply-To" | ||
|
||
12415 | ||
--9688d21d-95aa-4bed-afc7-f31b35731a3d-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
services/tickets/zendesk/testdata/TestOpenAndForward_forward_message.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: 367 | ||
Content-Length: 481 | ||
Authorization: Bearer **************** | ||
Content-Type: application/json | ||
Accept-Encoding: gzip | ||
|
||
{"instance_push_id":"1234-abcd","request_id":"sesame:1570461699000000000","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:38Z","author":{"external_id":"6393abc0-283d-4c9b-a1b3-641a035c34bf","name":"Cathy"},"allow_channelback":true}]} | ||
{"instance_push_id":"1234-abcd","request_id":"sesame:1570461699000000000","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:38Z","author":{"external_id":"6393abc0-283d-4c9b-a1b3-641a035c34bf","name":"Cathy"},"allow_channelback":true,"file_urls":["https://temba.ngrok.io/mr/tickets/types/zendesk/file?path=%2Fattachments%2F0123%2Fattachment1.jpg"]}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters