upd7
This commit is contained in:
parent
f4da3e1d51
commit
c98f4c2250
14
index.js
14
index.js
@ -127,7 +127,12 @@ app.post('/sendButtons', async (req, res) => {
|
||||
|
||||
try {
|
||||
const content = {
|
||||
viewOnceMessage: {
|
||||
message: {
|
||||
messageContextInfo: {
|
||||
deviceListMetadata: {},
|
||||
deviceListMetadataVersion: 2
|
||||
},
|
||||
interactiveMessage: proto.Message.InteractiveMessage.create({
|
||||
body: { text: "Bienvenue sur notre service !" },
|
||||
footer: { text: "Choisis une action ci-dessous" },
|
||||
@ -145,12 +150,8 @@ app.post('/sendButtons', async (req, res) => {
|
||||
})
|
||||
},
|
||||
{
|
||||
name: "cta_url",
|
||||
buttonParamsJson: JSON.stringify({
|
||||
display_text: "🌐 Voir notre site",
|
||||
url: "https://canguidev.fr",
|
||||
merchant_url: "https://canguidev.fr"
|
||||
})
|
||||
"name": "cta_url",
|
||||
"buttonParamsJson": "{\"display_text\":\"url\",\"url\":\"https://www.google.com\",\"merchant_url\":\"https://www.google.com\"}"
|
||||
},
|
||||
{
|
||||
name: "cta_call",
|
||||
@ -163,6 +164,7 @@ app.post('/sendButtons', async (req, res) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const msg = generateWAMessageFromContent(`${phone}@s.whatsapp.net`, content, {});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user