@open-wa/wa-automate 4.35.6 → 4.35.7

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.
@@ -258,7 +258,7 @@ class Client {
258
258
  if ((((_d = this._createConfig) === null || _d === void 0 ? void 0 : _d.autoEmoji) === undefined || ((_e = this._createConfig) === null || _e === void 0 ? void 0 : _e.autoEmoji)) && !this._autoEmojiSet) {
259
259
  const ident = typeof ((_f = this._createConfig) === null || _f === void 0 ? void 0 : _f.autoEmoji) === "string" ? (_g = this._createConfig) === null || _g === void 0 ? void 0 : _g.autoEmoji : ":";
260
260
  this.onMessage((message) => __awaiter(this, void 0, void 0, function* () {
261
- if (message.body && message.body.startsWith(ident) && message.body.endsWith(ident)) {
261
+ if ((message === null || message === void 0 ? void 0 : message.body) && message.body.startsWith(ident) && message.body.endsWith(ident)) {
262
262
  const emojiId = message.body.replace(new RegExp(ident, 'g'), "");
263
263
  if (!emojiId)
264
264
  return;
@@ -341,6 +341,10 @@ function create(config = {}) {
341
341
  WAToken1: localStorage.WAToken1,
342
342
  WAToken2: localStorage.WAToken2
343
343
  };
344
+ if (config.multiDevice) {
345
+ delete sessionData.WABrowserId;
346
+ logging_1.log.info("Multi-device detected. Removing Browser ID from session data to prevent session reauth corruption");
347
+ }
344
348
  const sdB64 = Buffer.from(JSON.stringify(sessionData)).toString('base64');
345
349
  spinner.emit(sessionData, "sessionData");
346
350
  spinner.emit(sdB64, "sessionDataBase64");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.35.6",
3
+ "version": "4.35.7",
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",