@open-wa/wa-automate 4.42.3 → 4.42.6

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.
@@ -1207,6 +1207,10 @@ export declare class Client {
1207
1207
  * @param chatId chat id: `xxxxx@c.us`
1208
1208
  */
1209
1209
  sendSeen(chatId: ChatId): Promise<boolean>;
1210
+ /**
1211
+ * Runs sendSeen on all chats
1212
+ */
1213
+ markAllRead(): Promise<boolean>;
1210
1214
  /**
1211
1215
  * Sets a chat status to unread. May be useful to get host's attention
1212
1216
  * @param chatId chat id: `xxxxx@c.us`
@@ -2572,6 +2572,14 @@ class Client {
2572
2572
  return yield this.pup(chatId => WAPI.sendSeen(chatId), chatId);
2573
2573
  });
2574
2574
  }
2575
+ /**
2576
+ * Runs sendSeen on all chats
2577
+ */
2578
+ markAllRead() {
2579
+ return __awaiter(this, void 0, void 0, function* () {
2580
+ return yield this.pup(() => WAPI.markAllRead());
2581
+ });
2582
+ }
2575
2583
  /**
2576
2584
  * Sets a chat status to unread. May be useful to get host's attention
2577
2585
  * @param chatId chat id: `xxxxx@c.us`
@@ -106,7 +106,7 @@ const setupApiDocs = (cliConfig) => {
106
106
  /**
107
107
  * Redirect to api docs if no path is specified
108
108
  */
109
- exports.app.use('/', (req, res) => res.redirect('/api-docs'));
109
+ exports.app.get('/', (req, res) => res.redirect('/api-docs'));
110
110
  };
111
111
  exports.setupApiDocs = setupApiDocs;
112
112
  const setupSwaggerStatsMiddleware = (cliConfig) => __awaiter(void 0, void 0, void 0, function* () {
@@ -153,7 +153,7 @@ function create(config = {}) {
153
153
  const qrManager = new auth_1.QRManager(config);
154
154
  const RAM_INFO = `Total: ${parseFloat(`${os.totalmem() / 1000000000}`).toFixed(2)} GB | Free: ${parseFloat(`${os.freemem() / 1000000000}`).toFixed(2)} GB`;
155
155
  logging_1.log.info("RAM INFO", RAM_INFO);
156
- const PPTR_VERSION = ((_a = (0, fs_extra_1.readJsonSync)(path.join(__dirname, '../../node_modules/puppeteer/package.json'), { throws: false })) === null || _a === void 0 ? void 0 : _a.version) || "UNKNOWN";
156
+ const PPTR_VERSION = ((_a = (0, fs_extra_1.readJsonSync)(require.resolve("puppeteer/package.json"), { throws: false })) === null || _a === void 0 ? void 0 : _a.version) || "UNKNOWN";
157
157
  logging_1.log.info("PPTR VERSION INFO", PPTR_VERSION);
158
158
  try {
159
159
  if (typeof config === 'string')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.42.3",
3
+ "version": "4.42.6",
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",