DKDKDK
This commit is contained in:
parent
a71c859d83
commit
3b248cc943
4
index.js
4
index.js
@ -71,11 +71,13 @@ app.post('/sendText', async (req, res) => {
|
||||
app.post('/sendButtons', async (req, res) => {
|
||||
const { phone } = req.body;
|
||||
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`;
|
||||
try {
|
||||
const content = {
|
||||
message: {
|
||||
interactiveMessage: proto.Message.InteractiveMessage.create({
|
||||
image: { url : imageUrl }, // Can buffer
|
||||
body: { text: "Bienvenue sur notre service !" },
|
||||
footer: { text: "Choisis une action ci-dessous" },
|
||||
header: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user