@vielhuber/wahelper 1.7.0 → 1.7.2
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/package.json +1 -1
- package/wahelper-daemon.js +3 -6
package/package.json
CHANGED
package/wahelper-daemon.js
CHANGED
|
@@ -632,10 +632,7 @@ export default class wahelperDaemon {
|
|
|
632
632
|
|
|
633
633
|
useMultiFileAuthState(this.dirname + '/' + this.authFolder)
|
|
634
634
|
.then(async ({ state, saveCreds }) => {
|
|
635
|
-
|
|
636
|
-
// fetchLatestBaileysVersion() returns a version that triggers a 405 — use a fixed working version instead.
|
|
637
|
-
// See: https://github.com/WhiskeySockets/Baileys/issues/2370
|
|
638
|
-
let version = [2, 3000, 1033893291];
|
|
635
|
+
let { version } = await fetchLatestBaileysVersion();
|
|
639
636
|
console.log('Baileys version: ' + version.join('.'));
|
|
640
637
|
|
|
641
638
|
// close stale socket if present
|
|
@@ -649,8 +646,8 @@ export default class wahelperDaemon {
|
|
|
649
646
|
this.sock = makeWASocket({
|
|
650
647
|
auth: state,
|
|
651
648
|
logger: P({ level: 'silent' }, P.destination(2)),
|
|
652
|
-
// sync full history
|
|
653
|
-
syncFullHistory:
|
|
649
|
+
// sync full history only during initial pairing and its required reconnect
|
|
650
|
+
syncFullHistory: !state.creds.registered || this.isFirstRun,
|
|
654
651
|
version,
|
|
655
652
|
browser: Browsers.windows('Desktop')
|
|
656
653
|
});
|