@vielhuber/wahelper 1.6.9 → 1.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vielhuber/wahelper",
3
- "version": "1.6.9",
3
+ "version": "1.7.1",
4
4
  "description": "Lightweight whatsapp integration layer.",
5
5
  "main": "wahelper.js",
6
6
  "files": [
@@ -4,7 +4,8 @@ import makeWASocket, {
4
4
  useMultiFileAuthState,
5
5
  DisconnectReason,
6
6
  downloadMediaMessage,
7
- fetchLatestBaileysVersion
7
+ fetchLatestBaileysVersion,
8
+ Browsers
8
9
  } from 'baileys';
9
10
  import P from 'pino';
10
11
  import qrcodeTerminal from 'qrcode-terminal';
@@ -631,10 +632,7 @@ export default class wahelperDaemon {
631
632
 
632
633
  useMultiFileAuthState(this.dirname + '/' + this.authFolder)
633
634
  .then(async ({ state, saveCreds }) => {
634
- // WhatsApp rejected Platform.WEB (value 14) since 2026-02-24.
635
- // fetchLatestBaileysVersion() returns a version that triggers a 405 — use a fixed working version instead.
636
- // See: https://github.com/WhiskeySockets/Baileys/issues/2370
637
- let version = [2, 3000, 1033893291];
635
+ let { version } = await fetchLatestBaileysVersion();
638
636
  console.log('Baileys version: ' + version.join('.'));
639
637
 
640
638
  // close stale socket if present
@@ -651,7 +649,7 @@ export default class wahelperDaemon {
651
649
  // sync full history always — on pairing and reconnects
652
650
  syncFullHistory: true,
653
651
  version,
654
- browser: ['Chrome', 'Windows', '110.0.5481.177']
652
+ browser: Browsers.windows('Desktop')
655
653
  });
656
654
 
657
655
  this.sock.ev.on('messaging-history.set', async obj => {