From 758cba09b6d0d36e4cafbead183ec2f13b54fca6 Mon Sep 17 00:00:00 2001 From: cangui Date: Tue, 6 May 2025 21:18:49 +0200 Subject: [PATCH] DSDSDS --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index bcd872e..3a0f8ce 100644 --- a/index.js +++ b/index.js @@ -73,13 +73,12 @@ app.post('/sendButtons', async (req, res) => { if (!sock || !isConnected) return res.status(400).json({ error: 'Non connecté' }); - const BASE_URL = process.env.BASE_URL || 'https://wa.canguidev.fr'; const imageUrl = `${BASE_URL}/static/logo-merlo-cs-FR.jpg`; const jid = `${phone}@s.whatsapp.net`; try { - await client.sendMessage( + await sock.sendMessage( jid, { image: { url: imageUrl }, @@ -113,7 +112,7 @@ app.post('/sendButtons', async (req, res) => { ] }, { - quoted: null // tu peux remplacer `null` par un message existant si besoin + quoted: null // ou un message existant si tu veux répondre à un message } ); @@ -124,6 +123,7 @@ app.post('/sendButtons', async (req, res) => { } }); + // Votre route POST app.post('/sendInteractiveImage', async (req, res) => { const { phone, caption, title, subtitle, footer } = req.body;