Skip to content

Commit

Permalink
Merge pull request #124 from avoylenko/message-media-support
Browse files Browse the repository at this point in the history
Support media with text message
  • Loading branch information
chrishubert authored Nov 19, 2023
2 parents 0b3695d + c355f25 commit 96b05fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controllers/clientController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down

0 comments on commit 96b05fb

Please sign in to comment.