@wppconnect-team/wppconnect 1.30.0 → 1.30.1
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 +4 -0
- package/dist/api/layers/host.layer.js +10 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## <small>1.30.1 (2024-03-11)</small>
|
|
2
|
+
|
|
3
|
+
- fix: Fixed login by qr code ([5ebd5f5](https://github.com/wppconnect-team/wppconnect/commit/5ebd5f5))
|
|
4
|
+
|
|
1
5
|
## 1.30.0 (2024-03-10)
|
|
2
6
|
|
|
3
7
|
- fix(deps): update dependency @wppconnect/wa-js to v3 (#2103) ([3f5a658](https://github.com/wppconnect-team/wppconnect/commit/3f5a658)), closes [#2103](https://github.com/wppconnect-team/wppconnect/issues/2103)
|
|
@@ -194,13 +194,14 @@ var HostLayer = /** @class */ (function () {
|
|
|
194
194
|
return [4 /*yield*/, this.page.exposeFunction('checkQrCode', function () { return _this.checkQrCode(); })];
|
|
195
195
|
case 2:
|
|
196
196
|
_a.sent();
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
case 3:
|
|
201
|
-
_a.sent();
|
|
197
|
+
/*await this.page.exposeFunction('loginByCode', (phone: string) =>
|
|
198
|
+
this.loginByCode(phone)
|
|
199
|
+
);*/
|
|
202
200
|
return [4 /*yield*/, this.page.exposeFunction('checkInChat', function () { return _this.checkInChat(); })];
|
|
203
|
-
case
|
|
201
|
+
case 3:
|
|
202
|
+
/*await this.page.exposeFunction('loginByCode', (phone: string) =>
|
|
203
|
+
this.loginByCode(phone)
|
|
204
|
+
);*/
|
|
204
205
|
_a.sent();
|
|
205
206
|
this.checkStartInterval = setInterval(function () { return _this.checkStart(); }, 5000);
|
|
206
207
|
this.page.on('close', function () {
|
|
@@ -241,7 +242,7 @@ var HostLayer = /** @class */ (function () {
|
|
|
241
242
|
if (!(result === null || result === void 0 ? void 0 : result.urlCode) || this.urlCode === result.urlCode) {
|
|
242
243
|
return [2 /*return*/];
|
|
243
244
|
}
|
|
244
|
-
if (typeof this.options.phoneNumber
|
|
245
|
+
if (typeof this.options.phoneNumber === 'string') {
|
|
245
246
|
return [2 /*return*/, this.loginByCode(this.options.phoneNumber)];
|
|
246
247
|
}
|
|
247
248
|
this.urlCode = result.urlCode;
|
|
@@ -468,14 +469,14 @@ var HostLayer = /** @class */ (function () {
|
|
|
468
469
|
authenticated = _g.sent();
|
|
469
470
|
this.startAutoClose();
|
|
470
471
|
if (!(authenticated === false)) return [3 /*break*/, 6];
|
|
471
|
-
this.log('http', typeof this.options.phoneNumber
|
|
472
|
+
this.log('http', typeof this.options.phoneNumber === 'string'
|
|
472
473
|
? 'Waiting for Login by Code...'
|
|
473
474
|
: 'Waiting for QRCode Scan...');
|
|
474
475
|
(_a = this.statusFind) === null || _a === void 0 ? void 0 : _a.call(this, 'notLogged', this.session);
|
|
475
476
|
return [4 /*yield*/, this.waitForQrCodeScan()];
|
|
476
477
|
case 3:
|
|
477
478
|
_g.sent();
|
|
478
|
-
this.log('http', typeof this.options.phoneNumber
|
|
479
|
+
this.log('http', typeof this.options.phoneNumber === 'string'
|
|
479
480
|
? 'Checking Login by Code status...'
|
|
480
481
|
: 'Checking QRCode status...');
|
|
481
482
|
// Wait for interface update
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wppconnect-team/wppconnect",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.1",
|
|
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",
|