new(all): Custom Domain support per bot.
This commit is contained in:
parent
8909834b82
commit
4c26cc0985
1 changed files with 5 additions and 6 deletions
|
@ -149,16 +149,15 @@ export class WhatsappDirectLine extends GBService {
|
||||||
client.initialize();
|
client.initialize();
|
||||||
this.browserWSEndpoint = browser.wsEndpoint(); // store for later
|
this.browserWSEndpoint = browser.wsEndpoint(); // store for later
|
||||||
|
|
||||||
var self = this;
|
browser.on('disconnected', (async () => {
|
||||||
client.on('disconnected', async () => {
|
client.browser = await puppeteer.connect({browserWSEndpoint: this.browserWSEndpoint});
|
||||||
client.browser = await puppeteer.connect({browserWSEndpoint: self.browserWSEndpoint});
|
}).bind(this));
|
||||||
}).bind(this);
|
|
||||||
// Dispatches messages to the received method.
|
// Dispatches messages to the received method.
|
||||||
|
|
||||||
|
|
||||||
client.on('message', async message => {
|
client.on('message', (async message => {
|
||||||
await this.WhatsAppCallback(message, null);
|
await this.WhatsAppCallback(message, null);
|
||||||
}).bind(this);
|
}).bind(this));
|
||||||
|
|
||||||
client.on('qr', (async (qr) => {
|
client.on('qr', (async (qr) => {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue