upd7
This commit is contained in:
parent
f4da3e1d51
commit
c98f4c2250
70
index.js
70
index.js
@ -127,41 +127,43 @@ app.post('/sendButtons', async (req, res) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const content = {
|
const content = {
|
||||||
message: {
|
viewOnceMessage: {
|
||||||
interactiveMessage: proto.Message.InteractiveMessage.create({
|
message: {
|
||||||
body: { text: "Bienvenue sur notre service !" },
|
messageContextInfo: {
|
||||||
footer: { text: "Choisis une action ci-dessous" },
|
deviceListMetadata: {},
|
||||||
header: {
|
deviceListMetadataVersion: 2
|
||||||
title: "Menu principal",
|
|
||||||
hasMediaAttachment: false
|
|
||||||
},
|
},
|
||||||
nativeFlowMessage: {
|
interactiveMessage: proto.Message.InteractiveMessage.create({
|
||||||
buttons: [
|
body: { text: "Bienvenue sur notre service !" },
|
||||||
{
|
footer: { text: "Choisis une action ci-dessous" },
|
||||||
name: "cta_reply",
|
header: {
|
||||||
buttonParamsJson: JSON.stringify({
|
title: "Menu principal",
|
||||||
display_text: "📩 Contacter support",
|
hasMediaAttachment: false
|
||||||
id: "support_action"
|
},
|
||||||
})
|
nativeFlowMessage: {
|
||||||
},
|
buttons: [
|
||||||
{
|
{
|
||||||
name: "cta_url",
|
name: "cta_reply",
|
||||||
buttonParamsJson: JSON.stringify({
|
buttonParamsJson: JSON.stringify({
|
||||||
display_text: "🌐 Voir notre site",
|
display_text: "📩 Contacter support",
|
||||||
url: "https://canguidev.fr",
|
id: "support_action"
|
||||||
merchant_url: "https://canguidev.fr"
|
})
|
||||||
})
|
},
|
||||||
},
|
{
|
||||||
{
|
"name": "cta_url",
|
||||||
name: "cta_call",
|
"buttonParamsJson": "{\"display_text\":\"url\",\"url\":\"https://www.google.com\",\"merchant_url\":\"https://www.google.com\"}"
|
||||||
buttonParamsJson: JSON.stringify({
|
},
|
||||||
display_text: "📞 Appeler le support",
|
{
|
||||||
id: "+33612345678"
|
name: "cta_call",
|
||||||
})
|
buttonParamsJson: JSON.stringify({
|
||||||
}
|
display_text: "📞 Appeler le support",
|
||||||
]
|
id: "+33612345678"
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user