new(all): Custom Domain support per bot.
This commit is contained in:
parent
dab35ac77f
commit
d563c0f5ed
1 changed files with 6 additions and 8 deletions
|
@ -138,9 +138,7 @@ export class WhatsappDirectLine extends GBService {
|
||||||
const gbaiName = `${this.min.botId}.gbai`;
|
const gbaiName = `${this.min.botId}.gbai`;
|
||||||
const localName = Path.join('work', gbaiName, 'profile');
|
const localName = Path.join('work', gbaiName, 'profile');
|
||||||
|
|
||||||
const browser = await createBrowser(localName);
|
const createClient = (browserWSEndpoint) => {
|
||||||
|
|
||||||
const createClient = (browserWSEndpoint) => {
|
|
||||||
let puppeteer: any = {
|
let puppeteer: any = {
|
||||||
headless: false, args: ['--disable-features=site-per-process',
|
headless: false, args: ['--disable-features=site-per-process',
|
||||||
`--user-data-dir=${localName}`]
|
`--user-data-dir=${localName}`]
|
||||||
|
@ -202,15 +200,15 @@ export class WhatsappDirectLine extends GBService {
|
||||||
GBLog.info(`WhatsApp QR Code authenticated for ${this.botId}.`);
|
GBLog.info(`WhatsApp QR Code authenticated for ${this.botId}.`);
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
client.browser.on('disconnected', (async () => {
|
||||||
|
(createClient.bind(this))(this.browserWSEndpoint);
|
||||||
|
}).bind(this));
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
(createClient.bind(this))(this.browserWSEndpoint);
|
(createClient.bind(this))(this.browserWSEndpoint);
|
||||||
|
|
||||||
browser.on('disconnected', (async () => {
|
|
||||||
(createClient.bind(this))(this.browserWSEndpoint);
|
|
||||||
}).bind(this));
|
|
||||||
|
|
||||||
setUrl = false;
|
setUrl = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue