@open-wa/wa-automate 4.62.3 → 4.62.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -482,10 +482,11 @@ export declare class Client {
482
482
  */
483
483
  getUnsentMessages(): Promise<Message[]>;
484
484
  /**
485
- * Forces the session to update the connection state. This will take a few seconds to determine the 'correct' state.
485
+ * Forces the session to update the connection state.
486
+ * @param killBeforeAttemptingToReconnect Setting this to true will force the session to drop the current socket connection before attempting to reconnect. This is useful if you want to force the session to reconnect immediately.
486
487
  * @returns updated connection state
487
488
  */
488
- forceUpdateConnectionState(): Promise<STATE>;
489
+ forceUpdateConnectionState(killBeforeReconnect?: boolean): Promise<STATE>;
489
490
  /**
490
491
  * Returns a list of contact with whom the host number has an existing chat who are also not contacts.
491
492
  */
@@ -1318,12 +1318,13 @@ class Client {
1318
1318
  });
1319
1319
  }
1320
1320
  /**
1321
- * Forces the session to update the connection state. This will take a few seconds to determine the 'correct' state.
1321
+ * Forces the session to update the connection state.
1322
+ * @param killBeforeAttemptingToReconnect Setting this to true will force the session to drop the current socket connection before attempting to reconnect. This is useful if you want to force the session to reconnect immediately.
1322
1323
  * @returns updated connection state
1323
1324
  */
1324
- forceUpdateConnectionState() {
1325
+ forceUpdateConnectionState(killBeforeReconnect) {
1325
1326
  return __awaiter(this, void 0, void 0, function* () {
1326
- return yield this._page.evaluate(() => WAPI.forceUpdateConnectionState());
1327
+ return yield this._page.evaluate((killBeforeReconnect) => WAPI.forceUpdateConnectionState(killBeforeReconnect), killBeforeReconnect);
1327
1328
  });
1328
1329
  }
1329
1330
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.62.3",
3
+ "version": "4.62.4",
4
4
  "licenseCheckUrl": "https://funcs.openwa.dev/license-check",
5
5
  "brokenMethodReportUrl": "https://funcs.openwa.dev/report-bm",
6
6
  "patches": "https://cdn.openwa.dev/patches.json",