Skip to content

Commit fd6068d

Browse files
committed
Add media support config for WAC
1 parent f42aadb commit fd6068d

File tree

2 files changed

+79
-42
lines changed

2 files changed

+79
-42
lines changed

Diff for: handlers/facebookapp/facebookapp.go

+34-21
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ var waIgnoreStatuses = map[string]bool{
7070
"deleted": true,
7171
}
7272

73+
// see https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media#supported-media-types
74+
var wacMediaSupport = map[handlers.MediaType]handlers.MediaTypeSupport{
75+
handlers.MediaType("image/webp"): {Types: []string{"image/webp"}, MaxBytes: 100 * 1024, MaxWidth: 512, MaxHeight: 512},
76+
handlers.MediaTypeImage: {Types: []string{"image/jpeg", "image/png"}, MaxBytes: 5 * 1024 * 1024},
77+
handlers.MediaTypeAudio: {Types: []string{"audio/aac", "audio/mp4", "audio/mpeg", "audio/amr", "audio/ogg"}, MaxBytes: 16 * 1024 * 1024},
78+
handlers.MediaTypeVideo: {Types: []string{"video/mp4", "video/3gp"}, MaxBytes: 16 * 1024 * 1024},
79+
handlers.MediaTypeApplication: {MaxBytes: 100 * 1024 * 1024},
80+
}
81+
7382
func newHandler(channelType courier.ChannelType, name string, useUUIDRoutes bool) courier.ChannelHandler {
7483
return &handler{handlers.NewBaseHandlerWithParams(channelType, name, useUUIDRoutes, []string{courier.ConfigAuthToken})}
7584
}
@@ -1129,12 +1138,17 @@ func (h *handler) sendCloudAPIWhatsappMsg(ctx context.Context, msg courier.Msg,
11291138
qrs := msg.QuickReplies()
11301139
lang := getSupportedLanguage(msg.Locale())
11311140

1141+
attachments, err := handlers.ResolveAttachments(ctx, h.Backend(), msg.Attachments(), wacMediaSupport, false)
1142+
if err != nil {
1143+
return nil, errors.Wrap(err, "error resolving attachments")
1144+
}
1145+
11321146
var payloadAudio wacMTPayload
11331147

1134-
for i := 0; i < len(msgParts)+len(msg.Attachments()); i++ {
1148+
for i := 0; i < len(msgParts)+len(attachments); i++ {
11351149
payload := wacMTPayload{MessagingProduct: "whatsapp", RecipientType: "individual", To: msg.URN().Path()}
11361150

1137-
if len(msg.Attachments()) == 0 {
1151+
if len(attachments) == 0 {
11381152
// do we have a template?
11391153
templating, err := h.getTemplating(msg)
11401154
if err != nil {
@@ -1155,14 +1169,14 @@ func (h *handler) sendCloudAPIWhatsappMsg(ctx context.Context, msg courier.Msg,
11551169
template.Components = append(payload.Template.Components, component)
11561170

11571171
} else {
1158-
if i < (len(msgParts) + len(msg.Attachments()) - 1) {
1172+
if i < (len(msgParts) + len(attachments) - 1) {
11591173
// this is still a msg part
11601174
text := &wacText{PreviewURL: false}
11611175
payload.Type = "text"
1162-
if strings.Contains(msgParts[i-len(msg.Attachments())], "https://") || strings.Contains(msgParts[i-len(msg.Attachments())], "http://") {
1176+
if strings.Contains(msgParts[i-len(attachments)], "https://") || strings.Contains(msgParts[i-len(attachments)], "http://") {
11631177
text.PreviewURL = true
11641178
}
1165-
text.Body = msgParts[i-len(msg.Attachments())]
1179+
text.Body = msgParts[i-len(attachments)]
11661180
payload.Text = text
11671181
} else {
11681182
if len(qrs) > 0 {
@@ -1171,7 +1185,7 @@ func (h *handler) sendCloudAPIWhatsappMsg(ctx context.Context, msg courier.Msg,
11711185
if len(qrs) <= 3 {
11721186
interactive := wacInteractive{Type: "button", Body: struct {
11731187
Text string "json:\"text\""
1174-
}{Text: msgParts[i-len(msg.Attachments())]}}
1188+
}{Text: msgParts[i-len(attachments)]}}
11751189

11761190
btns := make([]wacMTButton, len(qrs))
11771191
for i, qr := range qrs {
@@ -1190,7 +1204,7 @@ func (h *handler) sendCloudAPIWhatsappMsg(ctx context.Context, msg courier.Msg,
11901204
} else if len(qrs) <= 10 {
11911205
interactive := wacInteractive{Type: "list", Body: struct {
11921206
Text string "json:\"text\""
1193-
}{Text: msgParts[i-len(msg.Attachments())]}}
1207+
}{Text: msgParts[i-len(attachments)]}}
11941208

11951209
section := wacMTSection{
11961210
Rows: make([]wacMTSectionRow, len(qrs)),
@@ -1218,34 +1232,33 @@ func (h *handler) sendCloudAPIWhatsappMsg(ctx context.Context, msg courier.Msg,
12181232
// this is still a msg part
12191233
text := &wacText{PreviewURL: false}
12201234
payload.Type = "text"
1221-
if strings.Contains(msgParts[i-len(msg.Attachments())], "https://") || strings.Contains(msgParts[i-len(msg.Attachments())], "http://") {
1235+
if strings.Contains(msgParts[i-len(attachments)], "https://") || strings.Contains(msgParts[i-len(attachments)], "http://") {
12221236
text.PreviewURL = true
12231237
}
1224-
text.Body = msgParts[i-len(msg.Attachments())]
1238+
text.Body = msgParts[i-len(attachments)]
12251239
payload.Text = text
12261240
}
12271241
}
12281242
}
12291243

1230-
} else if i < len(msg.Attachments()) && (len(qrs) == 0 || len(qrs) > 3) {
1231-
attType, attURL := handlers.SplitAttachment(msg.Attachments()[i])
1232-
splitedAttType := strings.Split(attType, "/")
1233-
attType = splitedAttType[0]
1234-
attFormat := splitedAttType[1]
1244+
} else if i < len(attachments) && (len(qrs) == 0 || len(qrs) > 3) {
1245+
attURL := attachments[i].Media.URL()
1246+
attType := string(attachments[i].Type)
1247+
attContentType := attachments[i].Media.ContentType()
12351248

12361249
if attType == "application" {
12371250
attType = "document"
12381251
}
12391252
payload.Type = attType
12401253
media := wacMTMedia{Link: attURL}
12411254

1242-
if len(msgParts) == 1 && attType != "audio" && len(msg.Attachments()) == 1 && len(msg.QuickReplies()) == 0 {
1255+
if len(msgParts) == 1 && attType != "audio" && len(attachments) == 1 && len(msg.QuickReplies()) == 0 {
12431256
media.Caption = msgParts[i]
12441257
hasCaption = true
12451258
}
12461259

12471260
if attType == "image" {
1248-
if attFormat == "webp" {
1261+
if attContentType == "image/webp" {
12491262
payload.Type = "sticker"
12501263
payload.Sticker = &media
12511264
} else {
@@ -1276,8 +1289,8 @@ func (h *handler) sendCloudAPIWhatsappMsg(ctx context.Context, msg courier.Msg,
12761289

12771290
if len(msg.Attachments()) > 0 {
12781291
hasCaption = true
1279-
attType, attURL := handlers.SplitAttachment(msg.Attachments()[i])
1280-
attType = strings.Split(attType, "/")[0]
1292+
attURL := attachments[i].Media.URL()
1293+
attType := string(attachments[i].Type)
12811294
if attType == "application" {
12821295
attType = "document"
12831296
}
@@ -1353,7 +1366,7 @@ func (h *handler) sendCloudAPIWhatsappMsg(ctx context.Context, msg courier.Msg,
13531366
} else if len(qrs) <= 10 {
13541367
interactive := wacInteractive{Type: "list", Body: struct {
13551368
Text string "json:\"text\""
1356-
}{Text: msgParts[i-len(msg.Attachments())]}}
1369+
}{Text: msgParts[i-len(attachments)]}}
13571370

13581371
section := wacMTSection{
13591372
Rows: make([]wacMTSectionRow, len(qrs)),
@@ -1381,10 +1394,10 @@ func (h *handler) sendCloudAPIWhatsappMsg(ctx context.Context, msg courier.Msg,
13811394
// this is still a msg part
13821395
text := &wacText{PreviewURL: false}
13831396
payload.Type = "text"
1384-
if strings.Contains(msgParts[i-len(msg.Attachments())], "https://") || strings.Contains(msgParts[i-len(msg.Attachments())], "http://") {
1397+
if strings.Contains(msgParts[i-len(attachments)], "https://") || strings.Contains(msgParts[i-len(attachments)], "http://") {
13851398
text.PreviewURL = true
13861399
}
1387-
text.Body = msgParts[i-len(msg.Attachments())]
1400+
text.Body = msgParts[i-len(attachments)]
13881401
payload.Text = text
13891402
}
13901403
}

Diff for: handlers/facebookapp/facebookapp_test.go

+45-21
Original file line numberDiff line numberDiff line change
@@ -1288,12 +1288,12 @@ var SendTestCasesWAC = []ChannelSendTestCase{
12881288
Label: "Audio Send",
12891289
MsgText: "audio caption",
12901290
MsgURN: "whatsapp:250788123123",
1291-
MsgAttachments: []string{"audio/mpeg:https://foo.bar/audio.mp3"},
1291+
MsgAttachments: []string{"audio/mpeg:http://mock.com/3456/test.mp3"},
12921292
MockResponses: map[MockedRequest]*httpx.MockResponse{
12931293
{
12941294
Method: "POST",
12951295
Path: "/12345_ID/messages",
1296-
Body: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"audio","audio":{"link":"https://foo.bar/audio.mp3"}}`,
1296+
Body: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"audio","audio":{"link":"http://mock.com/3456/test.mp3"}}`,
12971297
}: httpx.NewMockResponse(201, nil, []byte(`{ "messages": [{"id": "157b5e14568e8"}] }`)),
12981298
{
12991299
Method: "POST",
@@ -1309,10 +1309,10 @@ var SendTestCasesWAC = []ChannelSendTestCase{
13091309
Label: "Document Send",
13101310
MsgText: "document caption",
13111311
MsgURN: "whatsapp:250788123123",
1312-
MsgAttachments: []string{"application/pdf:https://foo.bar/document.pdf"},
1312+
MsgAttachments: []string{"application/pdf:http://mock.com/7890/test.pdf"},
13131313
MockResponseBody: `{ "messages": [{"id": "157b5e14568e8"}] }`,
13141314
MockResponseStatus: 201,
1315-
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"document","document":{"link":"https://foo.bar/document.pdf","caption":"document caption","filename":"document.pdf"}}`,
1315+
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"document","document":{"link":"http://mock.com/7890/test.pdf","caption":"document caption","filename":"test.pdf"}}`,
13161316
ExpectedRequestPath: "/12345_ID/messages",
13171317
ExpectedMsgStatus: "W",
13181318
ExpectedExternalID: "157b5e14568e8",
@@ -1322,10 +1322,10 @@ var SendTestCasesWAC = []ChannelSendTestCase{
13221322
Label: "Image Send",
13231323
MsgText: "image caption",
13241324
MsgURN: "whatsapp:250788123123",
1325-
MsgAttachments: []string{"image/jpeg:https://foo.bar/image.jpg"},
1325+
MsgAttachments: []string{"image/jpeg:http://mock.com/1234/test.jpg"},
13261326
MockResponseBody: `{ "messages": [{"id": "157b5e14568e8"}] }`,
13271327
MockResponseStatus: 201,
1328-
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"image","image":{"link":"https://foo.bar/image.jpg","caption":"image caption"}}`,
1328+
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"image","image":{"link":"http://mock.com/1234/test.jpg","caption":"image caption"}}`,
13291329
ExpectedRequestPath: "/12345_ID/messages",
13301330
ExpectedMsgStatus: "W",
13311331
ExpectedExternalID: "157b5e14568e8",
@@ -1335,10 +1335,10 @@ var SendTestCasesWAC = []ChannelSendTestCase{
13351335
Label: "Sticker Send",
13361336
MsgText: "sticker caption",
13371337
MsgURN: "whatsapp:250788123123",
1338-
MsgAttachments: []string{"image/webp:https://foo.bar/sticker.webp"},
1338+
MsgAttachments: []string{"image/webp:http://mock.com/8901/test.webp"},
13391339
MockResponseBody: `{ "messages": [{"id": "157b5e14568e8"}] }`,
13401340
MockResponseStatus: 201,
1341-
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"sticker","sticker":{"link":"https://foo.bar/sticker.webp","caption":"sticker caption"}}`,
1341+
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"sticker","sticker":{"link":"http://mock.com/8901/test.webp","caption":"sticker caption"}}`,
13421342
ExpectedRequestPath: "/12345_ID/messages",
13431343
ExpectedMsgStatus: "W",
13441344
ExpectedExternalID: "157b5e14568e8",
@@ -1348,10 +1348,10 @@ var SendTestCasesWAC = []ChannelSendTestCase{
13481348
Label: "Video Send",
13491349
MsgText: "video caption",
13501350
MsgURN: "whatsapp:250788123123",
1351-
MsgAttachments: []string{"video/mp4:https://foo.bar/video.mp4"},
1351+
MsgAttachments: []string{"video/mp4:http://mock.com/5678/test.mp4"},
13521352
MockResponseBody: `{ "messages": [{"id": "157b5e14568e8"}] }`,
13531353
MockResponseStatus: 201,
1354-
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"video","video":{"link":"https://foo.bar/video.mp4","caption":"video caption"}}`,
1354+
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"video","video":{"link":"http://mock.com/5678/test.mp4","caption":"video caption"}}`,
13551355
ExpectedRequestPath: "/12345_ID/messages",
13561356
ExpectedMsgStatus: "W",
13571357
ExpectedExternalID: "157b5e14568e8",
@@ -1438,10 +1438,10 @@ var SendTestCasesWAC = []ChannelSendTestCase{
14381438
MsgText: "Interactive Button Msg",
14391439
MsgURN: "whatsapp:250788123123",
14401440
MsgQuickReplies: []string{"BUTTON1"},
1441-
MsgAttachments: []string{"image/jpeg:https://foo.bar/image.jpg"},
1441+
MsgAttachments: []string{"image/jpeg:http://mock.com/1234/test.jpg"},
14421442
MockResponseBody: `{ "messages": [{"id": "157b5e14568e8"}] }`,
14431443
MockResponseStatus: 201,
1444-
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"interactive","interactive":{"type":"button","header":{"type":"image","image":{"link":"https://foo.bar/image.jpg"}},"body":{"text":"Interactive Button Msg"},"action":{"buttons":[{"type":"reply","reply":{"id":"0","title":"BUTTON1"}}]}}}`,
1444+
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"interactive","interactive":{"type":"button","header":{"type":"image","image":{"link":"http://mock.com/1234/test.jpg"}},"body":{"text":"Interactive Button Msg"},"action":{"buttons":[{"type":"reply","reply":{"id":"0","title":"BUTTON1"}}]}}}`,
14451445
ExpectedRequestPath: "/12345_ID/messages",
14461446
ExpectedMsgStatus: "W",
14471447
ExpectedExternalID: "157b5e14568e8",
@@ -1452,10 +1452,10 @@ var SendTestCasesWAC = []ChannelSendTestCase{
14521452
MsgText: "Interactive Button Msg",
14531453
MsgURN: "whatsapp:250788123123",
14541454
MsgQuickReplies: []string{"BUTTON1"},
1455-
MsgAttachments: []string{"video/mp4:https://foo.bar/video.mp4"},
1455+
MsgAttachments: []string{"video/mp4:http://mock.com/5678/test.mp4"},
14561456
MockResponseBody: `{ "messages": [{"id": "157b5e14568e8"}] }`,
14571457
MockResponseStatus: 201,
1458-
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"interactive","interactive":{"type":"button","header":{"type":"video","video":{"link":"https://foo.bar/video.mp4"}},"body":{"text":"Interactive Button Msg"},"action":{"buttons":[{"type":"reply","reply":{"id":"0","title":"BUTTON1"}}]}}}`,
1458+
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"interactive","interactive":{"type":"button","header":{"type":"video","video":{"link":"http://mock.com/5678/test.mp4"}},"body":{"text":"Interactive Button Msg"},"action":{"buttons":[{"type":"reply","reply":{"id":"0","title":"BUTTON1"}}]}}}`,
14591459
ExpectedRequestPath: "/12345_ID/messages",
14601460
ExpectedMsgStatus: "W",
14611461
ExpectedExternalID: "157b5e14568e8",
@@ -1466,10 +1466,10 @@ var SendTestCasesWAC = []ChannelSendTestCase{
14661466
MsgText: "Interactive Button Msg",
14671467
MsgURN: "whatsapp:250788123123",
14681468
MsgQuickReplies: []string{"BUTTON1"},
1469-
MsgAttachments: []string{"document/pdf:https://foo.bar/document.pdf"},
1469+
MsgAttachments: []string{"document/pdf:http://mock.com/7890/test.pdf"},
14701470
MockResponseBody: `{ "messages": [{"id": "157b5e14568e8"}] }`,
14711471
MockResponseStatus: 201,
1472-
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"interactive","interactive":{"type":"button","header":{"type":"document","document":{"link":"https://foo.bar/document.pdf","filename":"document.pdf"}},"body":{"text":"Interactive Button Msg"},"action":{"buttons":[{"type":"reply","reply":{"id":"0","title":"BUTTON1"}}]}}}`,
1472+
ExpectedRequestBody: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"interactive","interactive":{"type":"button","header":{"type":"document","document":{"link":"http://mock.com/7890/test.pdf","filename":"test.pdf"}},"body":{"text":"Interactive Button Msg"},"action":{"buttons":[{"type":"reply","reply":{"id":"0","title":"BUTTON1"}}]}}}`,
14731473
ExpectedRequestPath: "/12345_ID/messages",
14741474
ExpectedMsgStatus: "W",
14751475
ExpectedExternalID: "157b5e14568e8",
@@ -1480,12 +1480,12 @@ var SendTestCasesWAC = []ChannelSendTestCase{
14801480
MsgText: "Interactive Button Msg",
14811481
MsgURN: "whatsapp:250788123123",
14821482
MsgQuickReplies: []string{"ROW1", "ROW2", "ROW3"},
1483-
MsgAttachments: []string{"audio/mp3:https://foo.bar/audio.mp3"},
1483+
MsgAttachments: []string{"audio/mp3:http://mock.com/3456/test.mp3"},
14841484
MockResponses: map[MockedRequest]*httpx.MockResponse{
14851485
{
14861486
Method: "POST",
14871487
Path: "/12345_ID/messages",
1488-
Body: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"audio","audio":{"link":"https://foo.bar/audio.mp3"}}`,
1488+
Body: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"audio","audio":{"link":"http://mock.com/3456/test.mp3"}}`,
14891489
}: httpx.NewMockResponse(201, nil, []byte(`{ "messages": [{"id": "157b5e14568e8"}] }`)),
14901490
{
14911491
Method: "POST",
@@ -1502,12 +1502,12 @@ var SendTestCasesWAC = []ChannelSendTestCase{
15021502
MsgText: "Interactive List Msg",
15031503
MsgURN: "whatsapp:250788123123",
15041504
MsgQuickReplies: []string{"ROW1", "ROW2", "ROW3", "ROW4"},
1505-
MsgAttachments: []string{"image/jpeg:https://foo.bar/image.jpg"},
1505+
MsgAttachments: []string{"image/jpeg:http://mock.com/1234/test.jpg"},
15061506
MockResponses: map[MockedRequest]*httpx.MockResponse{
15071507
{
15081508
Method: "POST",
15091509
Path: "/12345_ID/messages",
1510-
Body: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"image","image":{"link":"https://foo.bar/image.jpg"}}`,
1510+
Body: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"250788123123","type":"image","image":{"link":"http://mock.com/1234/test.jpg"}}`,
15111511
}: httpx.NewMockResponse(201, nil, []byte(`{ "messages": [{"id": "157b5e14568e8"}] }`)),
15121512
{
15131513
Method: "POST",
@@ -1553,6 +1553,30 @@ var SendTestCasesWAC = []ChannelSendTestCase{
15531553
},
15541554
}
15551555

1556+
// setupMedia takes care of having the media files needed to our test server host
1557+
func setupMedia(mb *test.MockBackend) {
1558+
imageJPG := test.NewMockMedia("test.jpg", "image/jpeg", "http://mock.com/1234/test.jpg", 1024*1024, 640, 480, 0, nil)
1559+
1560+
audioM4A := test.NewMockMedia("test.m4a", "audio/mp4", "http://mock.com/2345/test.m4a", 1024*1024, 0, 0, 200, nil)
1561+
audioMP3 := test.NewMockMedia("test.mp3", "audio/mpeg", "http://mock.com/3456/test.mp3", 1024*1024, 0, 0, 200, []courier.Media{audioM4A})
1562+
1563+
thumbJPG := test.NewMockMedia("test.jpg", "image/jpeg", "http://mock.com/4567/test.jpg", 1024*1024, 640, 480, 0, nil)
1564+
videoMP4 := test.NewMockMedia("test.mp4", "video/mp4", "http://mock.com/5678/test.mp4", 1024*1024, 0, 0, 1000, []courier.Media{thumbJPG})
1565+
1566+
videoMOV := test.NewMockMedia("test.mov", "video/quicktime", "http://mock.com/6789/test.mov", 100*1024*1024, 0, 0, 2000, nil)
1567+
1568+
filePDF := test.NewMockMedia("test.pdf", "application/pdf", "http://mock.com/7890/test.pdf", 100*1024*1024, 0, 0, 0, nil)
1569+
1570+
stickerWEBP := test.NewMockMedia("test.webp", "image/webp", "http://mock.com/8901/test.webp", 50*1024, 480, 480, 0, nil)
1571+
1572+
mb.MockMedia(imageJPG)
1573+
mb.MockMedia(audioMP3)
1574+
mb.MockMedia(videoMP4)
1575+
mb.MockMedia(videoMOV)
1576+
mb.MockMedia(filePDF)
1577+
mb.MockMedia(stickerWEBP)
1578+
}
1579+
15561580
func TestSending(t *testing.T) {
15571581
// shorter max msg length for testing
15581582
maxMsgLength = 100
@@ -1565,7 +1589,7 @@ func TestSending(t *testing.T) {
15651589

15661590
RunChannelSendTestCases(t, ChannelFBA, newHandler("FBA", "Facebook", false), SendTestCasesFBA, checkRedacted, nil)
15671591
RunChannelSendTestCases(t, ChannelIG, newHandler("IG", "Instagram", false), SendTestCasesIG, checkRedacted, nil)
1568-
RunChannelSendTestCases(t, ChannelWAC, newHandler("WAC", "Cloud API WhatsApp", false), SendTestCasesWAC, checkRedacted, nil)
1592+
RunChannelSendTestCases(t, ChannelWAC, newHandler("WAC", "Cloud API WhatsApp", false), SendTestCasesWAC, checkRedacted, setupMedia)
15691593
}
15701594

15711595
func TestSigning(t *testing.T) {

0 commit comments

Comments
 (0)