@whanext/core 0.18.0 → 0.18.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 +7 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.18.1
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Corrige a geração de código de pareamento no Zapo quando o servidor disponibiliza primeiro o fluxo QR (`auth_qr`) em vez de emitir `auth_pairing_required`.
|
|
8
|
+
- O provider agora considera tanto `auth_pairing_required` quanto `auth_qr` como sinais válidos de que `client.auth.requestPairingCode()` pode ser chamado.
|
|
9
|
+
|
|
3
10
|
## 0.18.0
|
|
4
11
|
|
|
5
12
|
### Provider Zapo
|
package/dist/index.js
CHANGED
|
@@ -2881,9 +2881,10 @@ var ZapoProvider = class {
|
|
|
2881
2881
|
}
|
|
2882
2882
|
#bind(client) {
|
|
2883
2883
|
client.on("auth_pairing_required", () => {
|
|
2884
|
-
this.#
|
|
2885
|
-
|
|
2886
|
-
|
|
2884
|
+
this.#markPairingReady();
|
|
2885
|
+
});
|
|
2886
|
+
client.on("auth_qr", () => {
|
|
2887
|
+
this.#markPairingReady();
|
|
2887
2888
|
});
|
|
2888
2889
|
client.on("auth_paired", () => {
|
|
2889
2890
|
this.#pairingRequired = false;
|
|
@@ -3304,6 +3305,11 @@ var ZapoProvider = class {
|
|
|
3304
3305
|
if (timestamp === void 0) return false;
|
|
3305
3306
|
return timestamp < this.#connectedAtSeconds - 3;
|
|
3306
3307
|
}
|
|
3308
|
+
#markPairingReady() {
|
|
3309
|
+
this.#pairingRequired = true;
|
|
3310
|
+
this.#resolvePairingReady?.();
|
|
3311
|
+
this.#resolvePairingReady = void 0;
|
|
3312
|
+
}
|
|
3307
3313
|
#preparePairingGate() {
|
|
3308
3314
|
this.#pairingRequired = false;
|
|
3309
3315
|
this.#pairingReady = new Promise((resolve3) => {
|