@vielhuber/wahelper 1.8.8 → 1.9.0

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.8.8",
3
+ "version": "1.9.0",
4
4
  "description": "Lightweight whatsapp integration layer.",
5
5
  "main": "wahelper.js",
6
6
  "files": [
@@ -828,7 +828,8 @@ export default class wahelperDaemon {
828
828
  // sync full history only during initial pairing and its required reconnect
829
829
  syncFullHistory: !state.creds.registered || this.isFirstRun,
830
830
  version,
831
- browser: Browsers.windows('Desktop')
831
+ // whatsapp rejects new logins as "Desktop" with full history sync (428 connectionClosed)
832
+ browser: Browsers.windows('Chrome')
832
833
  });
833
834
  this.sock = socket;
834
835
  staleSocket = null;
@@ -878,6 +879,9 @@ export default class wahelperDaemon {
878
879
  this.log(connection);
879
880
 
880
881
  if (qr) {
882
+ // the socket is alive and waits for the user to link the device
883
+ clearTimeout(this.connectionTimeout);
884
+ this.connectionTimeout = null;
881
885
  this.isFirstRun = true;
882
886
  if (USE_PAIRING_CODE) {
883
887
  // request pairing code once per session