@open-wa/wa-automate 4.35.6 → 4.35.7
Sign up to get free protection for your applications and to get access to all the features.
package/dist/api/Client.js
CHANGED
@@ -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