From e8e10a876ea32173001b8ffa2c0daab539583c62 Mon Sep 17 00:00:00 2001 From: julien Date: Tue, 6 May 2025 12:24:23 +0200 Subject: [PATCH] fffssss --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index b4e04b8..0d9c0e3 100644 --- a/index.js +++ b/index.js @@ -60,6 +60,7 @@ app.post('/sendText', async (req, res) => { const { phone, message } = req.body; if (!sock || !isConnected) return res.status(400).json({ error: 'Non connecté' }); try { + await sock.sendMessage(`${phone}@s.whatsapp.net`, { text: message }); res.json({ success: true }); } catch (e) { @@ -76,6 +77,7 @@ app.post('/sendButtons', async (req, res) => { buttons: buttons.map((b, i) => ({ buttonId: `btn_${i}`, buttonText: { displayText: b }, type: 1 })), headerType: 1 }; + console.log(btnMsg); await sock.sendMessage(`${phone}@s.whatsapp.net`, btnMsg); res.json({ success: true }); } catch (e) {