@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vielhuber/wahelper",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Lightweight whatsapp integration layer.",
5
5
  "main": "wahelper.js",
6
6
  "files": [
@@ -632,10 +632,7 @@ export default class wahelperDaemon {
632
632
 
633
633
  useMultiFileAuthState(this.dirname + '/' + this.authFolder)
634
634
  .then(async ({ state, saveCreds }) => {
635
- // WhatsApp rejected Platform.WEB (value 14) since 2026-02-24.
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 always on pairing and reconnects
653
- syncFullHistory: true,
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
  });