new(whatsapp.gblib): New WhatsApp provider: Meta.
This commit is contained in:
parent
645af9acd4
commit
6518c9ca12
1 changed files with 23 additions and 20 deletions
|
@ -669,7 +669,7 @@ export class GBConversationalService {
|
|||
text = text.replace(/\n/g, "\\n");
|
||||
}
|
||||
|
||||
let data = {
|
||||
let data:any = {
|
||||
name: isMedia ? 'broadcast_notext' : 'broadcast', components: [
|
||||
{
|
||||
type: "header",
|
||||
|
@ -678,11 +678,15 @@ export class GBConversationalService {
|
|||
type: "image",
|
||||
image: {
|
||||
link: urlImage,
|
||||
},
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
if (!isMedia) {
|
||||
data.components.push({
|
||||
type: "body",
|
||||
parameters: [
|
||||
{
|
||||
|
@ -690,9 +694,8 @@ export class GBConversationalService {
|
|||
text: text,
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
GBLogEx.info(min, `Sending answer file to mobile: ${mobile}. Header: ${urlImage}`);
|
||||
await this.sendToMobile(min, mobile, data, null);
|
||||
|
|
Loading…
Add table
Reference in a new issue