diff --git a/packages/whatsapp.gblib/services/WhatsappDirectLine.ts b/packages/whatsapp.gblib/services/WhatsappDirectLine.ts index 8aad0edf..174fe34e 100644 --- a/packages/whatsapp.gblib/services/WhatsappDirectLine.ts +++ b/packages/whatsapp.gblib/services/WhatsappDirectLine.ts @@ -290,6 +290,16 @@ export class WhatsappDirectLine extends GBService { from = req.body.messages[0].author.split('@')[0]; fromName = req.body.messages[0].senderName; + if (message.type !== 'chat') { + attachments = []; + attachments.push( + { + name: 'uploaded', + contentType: 'application/octet-stream', + contentUrl: message.body + }); + } + if (req.body.messages[0].fromMe) { res.end();