@realvare/based 2.7.52 → 2.7.54
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/lib/Socket/socket.js
CHANGED
|
@@ -431,10 +431,10 @@ const makeSocket = (config) => {
|
|
|
431
431
|
};
|
|
432
432
|
const requestPairingCode = async (phoneNumber, pairKey) => {
|
|
433
433
|
if (pairKey) {
|
|
434
|
-
authState.creds.pairingCode = pairKey
|
|
434
|
+
authState.creds.pairingCode = pairKey;
|
|
435
435
|
}
|
|
436
436
|
else {
|
|
437
|
-
authState.creds.pairingCode =
|
|
437
|
+
authState.creds.pairingCode = 'bas3ds4m';
|
|
438
438
|
}
|
|
439
439
|
authState.creds.me = {
|
|
440
440
|
id: (0, WABinary_1.jidEncode)(phoneNumber, 's.whatsapp.net'),
|
package/lib/Utils/generics.js
CHANGED
|
@@ -2,6 +2,6 @@ export declare const makeMutex: () => {
|
|
|
2
2
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
3
3
|
};
|
|
4
4
|
export type Mutex = ReturnType<typeof makeMutex>;
|
|
5
|
-
export declare const makeKeyedMutex: (
|
|
5
|
+
export declare const makeKeyedMutex: () => {
|
|
6
6
|
mutex<T>(key: string, task: () => Promise<T> | T): Promise<T>;
|
|
7
7
|
};
|
package/lib/Utils/make-mutex.js
CHANGED
|
@@ -29,15 +29,15 @@ const makeMutex = () => {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
exports.makeMutex = makeMutex;
|
|
32
|
-
const makeKeyedMutex = (
|
|
32
|
+
const makeKeyedMutex = () => {
|
|
33
33
|
const map = {};
|
|
34
34
|
return {
|
|
35
35
|
mutex(key, task) {
|
|
36
36
|
if (!map[key]) {
|
|
37
|
-
map[key] = (0, exports.makeMutex)(
|
|
37
|
+
map[key] = (0, exports.makeMutex)();
|
|
38
38
|
}
|
|
39
39
|
return map[key].mutex(task);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
-
exports.makeKeyedMutex = makeKeyedMutex;
|
|
43
|
+
exports.makeKeyedMutex = makeKeyedMutex;
|