@open-wa/wa-automate 4.23.3 → 4.23.4
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/dist/api/Client.js +4 -1
- package/package.json +1 -1
package/dist/api/Client.js
CHANGED
@@ -266,7 +266,10 @@ class Client {
|
|
266
266
|
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 : ":";
|
267
267
|
this.onMessage((message) => __awaiter(this, void 0, void 0, function* () {
|
268
268
|
if (message.body && message.body.startsWith(ident) && message.body.endsWith(ident)) {
|
269
|
-
|
269
|
+
const emojiId = message.body.replace(new RegExp(ident, 'g'), "");
|
270
|
+
if (!emojiId)
|
271
|
+
return;
|
272
|
+
return yield this.sendEmoji(message.from, emojiId, message.id);
|
270
273
|
}
|
271
274
|
}));
|
272
275
|
}
|
package/package.json
CHANGED