new(all): Custom Domain support per bot.

This commit is contained in:
rodrigorodriguez 2022-10-09 17:47:38 -03:00
parent a12c3383a1
commit 12fb0daeee

View file

@ -162,8 +162,6 @@ export class WhatsappDirectLine extends GBService {
puppeteer: puppeteer puppeteer: puppeteer
}); });
await client.initialize();
this.browserWSEndpoint = client.pupBrowser.wsEndpoint();
client.on('message', (async message => { client.on('message', (async message => {
await this.WhatsAppCallback(message, null); await this.WhatsAppCallback(message, null);
@ -227,6 +225,8 @@ export class WhatsappDirectLine extends GBService {
GBLog.info(`Browser terminated. Restarting ${this.min.botId} WhatsApp native provider.`); GBLog.info(`Browser terminated. Restarting ${this.min.botId} WhatsApp native provider.`);
await (createClient.bind(this))(null); await (createClient.bind(this))(null);
}).bind(this)); }).bind(this));
client.initialize();
}; };
await (createClient.bind(this))(this.browserWSEndpoint); await (createClient.bind(this))(this.browserWSEndpoint);