new(all): Custom Domain support per bot.
This commit is contained in:
parent
12fb0daeee
commit
dfd89ec5e7
1 changed files with 11 additions and 5 deletions
|
@ -202,6 +202,17 @@ export class WhatsappDirectLine extends GBService {
|
|||
|
||||
client.on('authenticated', async () => {
|
||||
this.browserWSEndpoint = client.pupBrowser.wsEndpoint();
|
||||
GBLog.info(`GBWhatsApp: QR Code authenticated for ${this.botId}.`);
|
||||
});
|
||||
|
||||
client.on('ready', async () => {
|
||||
|
||||
client.pupBrowser.on('disconnected', (async () => {
|
||||
GBLog.info(`Browser terminated. Restarting ${this.min.botId} WhatsApp native provider.`);
|
||||
await (createClient.bind(this))(null);
|
||||
}).bind(this));
|
||||
|
||||
GBLog.info(`GBWhatsApp: Empty chat list for ${this.botId}GBWhatsApp:...`);
|
||||
|
||||
// Keeps the chat list cleaned.
|
||||
|
||||
|
@ -219,12 +230,7 @@ export class WhatsappDirectLine extends GBService {
|
|||
|
||||
});
|
||||
|
||||
GBLog.info(`WhatsApp QR Code authenticated for ${this.botId}.`);
|
||||
});
|
||||
client.pupBrowser.on('disconnected', (async () => {
|
||||
GBLog.info(`Browser terminated. Restarting ${this.min.botId} WhatsApp native provider.`);
|
||||
await (createClient.bind(this))(null);
|
||||
}).bind(this));
|
||||
|
||||
client.initialize();
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue