This commit is contained in:
julien 2025-05-06 14:05:53 +02:00
parent 5f74c970f3
commit f4da3e1d51

View File

@ -127,47 +127,41 @@ app.post('/sendButtons', async (req, res) => {
try { try {
const content = { const content = {
viewOnceMessage: { message: {
message: { interactiveMessage: proto.Message.InteractiveMessage.create({
messageContextInfo: { body: { text: "Bienvenue sur notre service !" },
deviceListMetadata: {}, footer: { text: "Choisis une action ci-dessous" },
deviceListMetadataVersion: 2 header: {
title: "Menu principal",
hasMediaAttachment: false
}, },
interactiveMessage: proto.Message.InteractiveMessage.create({ nativeFlowMessage: {
body: { text: "Bienvenue sur notre service !" }, buttons: [
footer: { text: "Choisis une action ci-dessous" }, {
header: { name: "cta_reply",
title: "Menu principal", buttonParamsJson: JSON.stringify({
hasMediaAttachment: false display_text: "📩 Contacter support",
}, id: "support_action"
nativeFlowMessage: { })
buttons: [ },
{ {
name: "cta_reply", name: "cta_url",
buttonParamsJson: JSON.stringify({ buttonParamsJson: JSON.stringify({
display_text: "📩 Contacter support", display_text: "🌐 Voir notre site",
id: "support_action" url: "https://canguidev.fr",
}) merchant_url: "https://canguidev.fr"
}, })
{ },
name: "cta_url", {
buttonParamsJson: JSON.stringify({ name: "cta_call",
display_text: "🌐 Voir notre site", buttonParamsJson: JSON.stringify({
url: "https://canguidev.fr", display_text: "📞 Appeler le support",
merchant_url: "https://canguidev.fr" id: "+33612345678"
}) })
}, }
{ ]
name: "cta_call", }
buttonParamsJson: JSON.stringify({ })
display_text: "📞 Appeler le support",
id: "+33612345678"
})
}
]
}
})
}
} }
}; };