fdfdfd
This commit is contained in:
parent
4a86be379d
commit
a09871b998
3
index.js
3
index.js
@ -127,8 +127,7 @@ app.post('/sendInteractiveImage', async (req, res) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const imagePath = path.join(__dirname, 'public', 'logo-merlo-cs-FR.jpg');
|
const imagePath = path.join(__dirname, 'public', 'logo-merlo-cs-FR.jpg');
|
||||||
const sharp = require('sharp');
|
const resizedBuffer = fs.readFileSync(imagePath);
|
||||||
const resizedBuffer = await sharp(imagePath).resize(600, 400).toBuffer();
|
|
||||||
|
|
||||||
await sock.sendMessage(`${phone}@s.whatsapp.net`, {
|
await sock.sendMessage(`${phone}@s.whatsapp.net`, {
|
||||||
image: resizedBuffer,
|
image: resizedBuffer,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user