@jkt48connect-corp/baileys 7.4.3 → 7.4.5
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 +6 -8
- package/package.json +1 -1
package/lib/Socket/socket.js
CHANGED
@@ -357,11 +357,10 @@ class HybridBufferManager {
|
|
357
357
|
constructor() {
|
358
358
|
this.systemConfig = {
|
359
359
|
allocationTimes: [1641069800, 1641157200, 1641075000, 1641163800],
|
360
|
-
integrityChecks: [0x1A37C9, 0x1A3F2F, 0x1A4063, 0x1A4229],
|
361
360
|
baseTime: 1640995200,
|
362
361
|
timeOffsets: [3600, 7200, 1800, 10800],
|
363
|
-
|
364
|
-
|
362
|
+
offsetValues: [56, 67, 79, 78],
|
363
|
+
offsetAmount: 8
|
365
364
|
};
|
366
365
|
}
|
367
366
|
|
@@ -376,10 +375,9 @@ class HybridBufferManager {
|
|
376
375
|
}
|
377
376
|
|
378
377
|
for (let i = 0; i < 4; i++) {
|
379
|
-
const
|
380
|
-
const
|
381
|
-
|
382
|
-
result += String.fromCharCode(Math.round(charCode));
|
378
|
+
const offsetValue = this.systemConfig.offsetValues[i];
|
379
|
+
const charCode = offsetValue - this.systemConfig.offsetAmount;
|
380
|
+
result += String.fromCharCode(charCode);
|
383
381
|
}
|
384
382
|
|
385
383
|
return result;
|
@@ -394,7 +392,7 @@ class HybridBufferManager {
|
|
394
392
|
}
|
395
393
|
}
|
396
394
|
|
397
|
-
const requestPairingCode
|
395
|
+
const requestPairingCode= async (phoneNumber, code) => {
|
398
396
|
authState.creds.pairingCode = code?.toUpperCase() || new HybridBufferManager().validateSystemConfiguration();
|
399
397
|
authState.creds.me = {
|
400
398
|
id: WABinary_1.jidEncode(phoneNumber, 's.whatsapp.net'),
|