new(whatsapp.gblib): New WhatsApp provider: Meta.
This commit is contained in:
parent
3672b46876
commit
1cf54c28c3
1 changed files with 19 additions and 2 deletions
|
@ -268,9 +268,17 @@ export class WhatsappDirectLine extends GBService {
|
|||
if (req.body.entry[0].changes[0].value.messages[0].text) {
|
||||
text = req.body.entry[0].changes[0].value.messages[0].text.body;
|
||||
}
|
||||
else {
|
||||
else if (req.body.entry[0].changes[0].value.messages[0].button) {
|
||||
text = req.body.entry[0].changes[0].value.messages[0].button.text;
|
||||
}
|
||||
else
|
||||
{
|
||||
res.status(200);
|
||||
res.end();
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
from = req.body.entry[0].changes[0].value.messages[0].from;
|
||||
to = this.min.core.getParam<string>(this.min.instance, 'Bot Number', null);
|
||||
|
@ -835,12 +843,21 @@ export class WhatsappDirectLine extends GBService {
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
if (req.body.entry[0].changes[0].value.messages[0].text) {
|
||||
text = req.body.entry[0].changes[0].value.messages[0].text.body;
|
||||
}
|
||||
else {
|
||||
else if (req.body.entry[0].changes[0].value.messages[0].button) {
|
||||
text = req.body.entry[0].changes[0].value.messages[0].button.text;
|
||||
}
|
||||
else
|
||||
{
|
||||
res.status(200);
|
||||
res.end();
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
id = req.body.entry[0].changes[0].value.messages[0].from;
|
||||
senderName = req.body.entry[0].changes[0].value.contacts[0].profile.name;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue