diff --git a/src/controllers/clientController.js b/src/controllers/clientController.js index 9843cf12..0971e3dd 100644 --- a/src/controllers/clientController.js +++ b/src/controllers/clientController.js @@ -73,6 +73,10 @@ const sendMessage = async (req, res) => { let messageOut switch (contentType) { case 'string': + if (options.media) { + const media = options.media + options.media = new MessageMedia(media.mimetype, media.data, media.filename = null, media.filesize = null) + } messageOut = await client.sendMessage(chatId, content, options) break case 'MessageMediaFromURL': {