new(whatsapp.gblib): Native provider works in groups now.
This commit is contained in:
parent
60b3536d8b
commit
2c28eff318
1 changed files with 6 additions and 4 deletions
|
@ -102,11 +102,13 @@ async function createBrowser(profilePath): Promise<any> {
|
||||||
args.push(`--user-data-dir=${profilePath}`);
|
args.push(`--user-data-dir=${profilePath}`);
|
||||||
|
|
||||||
const preferences = urljoin(profilePath, "Default", "Preferences");
|
const preferences = urljoin(profilePath, "Default", "Preferences");
|
||||||
|
if (Fs.existsSync(preferences)) {
|
||||||
const file = Fs.readFileSync(preferences, "utf8")
|
const file = Fs.readFileSync(preferences, "utf8")
|
||||||
const data = JSON.parse(file)
|
const data = JSON.parse(file)
|
||||||
data["profile"]['exit_type'] = "none";
|
data["profile"]['exit_type'] = "none";
|
||||||
Fs.writeFileSync(preferences, JSON.stringify(data))
|
Fs.writeFileSync(preferences, JSON.stringify(data))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const browser = await puppeteer.launch({
|
const browser = await puppeteer.launch({
|
||||||
args: args,
|
args: args,
|
||||||
|
|
Loading…
Add table
Reference in a new issue