new(all): Custom Domain support per bot.
This commit is contained in:
parent
ad5744aa7d
commit
bbf40cba72
1 changed files with 13 additions and 12 deletions
|
@ -195,20 +195,21 @@ export class WhatsappDirectLine extends GBService {
|
||||||
|
|
||||||
client.on('authenticated', () => {
|
client.on('authenticated', () => {
|
||||||
this.browserWSEndpoint = client.pupBrowser.wsEndpoint();
|
this.browserWSEndpoint = client.pupBrowser.wsEndpoint();
|
||||||
GBLog.info(`WhatsApp QR Code authenticated for ${this.botId}.`);
|
|
||||||
});
|
|
||||||
|
|
||||||
client.pupBrowser.on('disconnected', (async () => {
|
client.pupBrowser.on('disconnected', (async () => {
|
||||||
GBLog.info(`555555`);
|
GBLog.info(`Browser crashed. Restarting ${this.min.botId} WhatsApp native provider.`);
|
||||||
await (createClient.bind(this))(null);
|
await (createClient.bind(this))(null);
|
||||||
}).bind(this));
|
}).bind(this));
|
||||||
client.pupPage.on('error', (async () => {
|
client.pupPage.on('error', (async () => {
|
||||||
GBLog.info(`22222s`);
|
GBLog.info(`Page crashed. Restarting ${this.min.botId} WhatsApp native provider.`);
|
||||||
if (!client.pupPage.isClosed()){
|
if (!client.pupPage.isClosed()){
|
||||||
client.pupPage.close();
|
client.pupPage.close();
|
||||||
} await (createClient.bind(this))(null);
|
} await (createClient.bind(this))(null);
|
||||||
}).bind(this));
|
}).bind(this));
|
||||||
|
|
||||||
|
GBLog.info(`WhatsApp QR Code authenticated for ${this.botId}.`);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue