new(whatsapp.gblib): Multiple providers can be loaded at once.
This commit is contained in:
parent
6c0ce4fa10
commit
cad03e145e
1 changed files with 5 additions and 2 deletions
|
@ -132,13 +132,16 @@ export class WhatsappDirectLine extends GBService {
|
|||
let phoneId = this.whatsappServiceNumber.split(';')[0];
|
||||
let productId = this.whatsappServiceNumber.split(';')[1]
|
||||
|
||||
let url = `${this.INSTANCE_URL}/${productId}/setWebhook`;
|
||||
let url = `${this.INSTANCE_URL}/${phoneId}/config`;
|
||||
WhatsappDirectLine.phones[phoneId] = this.botId;
|
||||
|
||||
options = {
|
||||
url: url,
|
||||
method: 'POST',
|
||||
body: { webhook: `${GBServer.globals.publicAddress}/webhooks/whatsapp/${this.botId}` },
|
||||
body: {
|
||||
webhook: `${GBServer.globals.publicAddress}/webhooks/whatsapp/${this.botId}`,
|
||||
"ack_delivery": false
|
||||
},
|
||||
headers: {
|
||||
'x-maytapi-key': this.whatsappServiceKey,
|
||||
'Content-Type': 'application/json',
|
||||
|
|
Loading…
Add table
Reference in a new issue