@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 +1 -1
- package/wahelper-daemon.js +4 -6
package/package.json
CHANGED
package/wahelper-daemon.js
CHANGED
|
@@ -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
|
-
|
|
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:
|
|
652
|
+
browser: Browsers.windows('Desktop')
|
|
655
653
|
});
|
|
656
654
|
|
|
657
655
|
this.sock.ev.on('messaging-history.set', async obj => {
|