@wppconnect-team/wppconnect 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/api/layers/host.layer.js +7 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [2.3.3](https://github.com/wppconnect-team/wppconnect/compare/v2.3.2...v2.3.3) (2026-09-07)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- preserve QR authentication state during navigation ([#2891](https://github.com/wppconnect-team/wppconnect/issues/2891)) ([4951d60](https://github.com/wppconnect-team/wppconnect/commit/4951d60886338de1e19bb4f0bbeacf3e3777c0bc))
|
|
6
|
+
|
|
1
7
|
## [2.3.2](https://github.com/wppconnect-team/wppconnect/compare/v2.3.1...v2.3.2) (2026-09-03)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
|
@@ -152,6 +152,10 @@ class HostLayer {
|
|
|
152
152
|
}
|
|
153
153
|
async checkQrCode() {
|
|
154
154
|
const needScan = await (0, auth_1.needsToScan)(this.page).catch(() => null);
|
|
155
|
+
// A navigation can invalidate the execution context while waiting for QR.
|
|
156
|
+
// An unknown result is not proof that the session has registered.
|
|
157
|
+
if (needScan === null)
|
|
158
|
+
return;
|
|
155
159
|
this.isLogged = !needScan;
|
|
156
160
|
if (!needScan) {
|
|
157
161
|
this.attempt = 0;
|
|
@@ -260,6 +264,8 @@ class HostLayer {
|
|
|
260
264
|
while (!this.page.isClosed() && !this.isLogged) {
|
|
261
265
|
await (0, sleep_1.sleep)(200);
|
|
262
266
|
const needScan = await (0, auth_1.needsToScan)(this.page).catch(() => null);
|
|
267
|
+
if (needScan === null)
|
|
268
|
+
continue;
|
|
263
269
|
this.isLogged = !needScan;
|
|
264
270
|
}
|
|
265
271
|
}
|
|
@@ -277,7 +283,7 @@ class HostLayer {
|
|
|
277
283
|
return false;
|
|
278
284
|
}
|
|
279
285
|
await (0, sleep_1.sleep)(1000);
|
|
280
|
-
const inChat = (0, auth_1.isInsideChat)(this.page).catch(() => null);
|
|
286
|
+
const inChat = await (0, auth_1.isInsideChat)(this.page).catch(() => null);
|
|
281
287
|
this.isInChat = !!inChat;
|
|
282
288
|
}
|
|
283
289
|
return this.isInChat;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wppconnect-team/wppconnect",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"description": "WPPConnect is an open source project developed by the JavaScript community with the aim of exporting functions from WhatsApp Web to the node, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination... 😀🤔💭",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"commitizen": "^4.3.2",
|
|
76
76
|
"concurrently": "^10.0.5",
|
|
77
77
|
"conventional-changelog-cli": "^5.0.0",
|
|
78
|
-
"eslint": "10.
|
|
78
|
+
"eslint": "10.10.0",
|
|
79
79
|
"eslint-config-prettier": "^10.1.8",
|
|
80
80
|
"eslint-plugin-prettier": "^5.5.6",
|
|
81
81
|
"globals": "^17.12.0",
|