Skip to content

Commit

Permalink
fix(provider): ⚡ fix send image baileys
Browse files Browse the repository at this point in the history
  • Loading branch information
leifermendez committed Jan 7, 2023
1 parent 9e0a61b commit 5d10cb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/provider/src/baileys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const pino = require('pino')
const rimraf = require('rimraf')
const mime = require('mime-types')
const { join } = require('path')
const { existsSync, createWriteStream } = require('fs')
const { existsSync, createWriteStream, readFileSync } = require('fs')
const { Console } = require('console')

const {
Expand Down Expand Up @@ -167,8 +167,8 @@ class BaileysProvider extends ProviderClass {
sendMedia = async (number, imageUrl, text) => {
const fileDownloaded = await baileyDownloadMedia(imageUrl)
return this.vendor.sendMessage(number, {
image: { url: fileDownloaded },
text,
image: readFileSync(fileDownloaded),
caption: text,
})
}

Expand Down

0 comments on commit 5d10cb9

Please sign in to comment.