Skip to content

Commit

Permalink
support media with text message
Browse files Browse the repository at this point in the history
  • Loading branch information
avoylenko committed Nov 18, 2023
1 parent 0b3695d commit c355f25
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 c355f25

Please sign in to comment.