@open-wa/wa-automate 4.32.13 → 4.32.14
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.d.ts +1 -0
- package/dist/api/Client.js +6 -1
- package/package.json +1 -1
package/dist/api/Client.d.ts
CHANGED
@@ -43,6 +43,7 @@ export declare class Client {
|
|
43
43
|
private _onLogoutCallbacks;
|
44
44
|
private _queues;
|
45
45
|
private _autoEmojiSet;
|
46
|
+
private _autoEmojiQ;
|
46
47
|
private _onLogoutSet;
|
47
48
|
/**
|
48
49
|
* This is used to track if a listener is already used via webhook. Before, webhooks used to be set once per listener. Now a listener can be set via multiple webhooks, or revoked from a specific webhook.
|
package/dist/api/Client.js
CHANGED
@@ -92,6 +92,11 @@ class Client {
|
|
92
92
|
this._onLogoutCallbacks = [];
|
93
93
|
this._queues = {};
|
94
94
|
this._autoEmojiSet = false;
|
95
|
+
this._autoEmojiQ = new p_queue_1.default({
|
96
|
+
concurrency: 1,
|
97
|
+
intervalCap: 1,
|
98
|
+
carryoverConcurrencyCount: true
|
99
|
+
});
|
95
100
|
this._onLogoutSet = false;
|
96
101
|
/**
|
97
102
|
* This is used to track if a listener is already used via webhook. Before, webhooks used to be set once per listener. Now a listener can be set via multiple webhooks, or revoked from a specific webhook.
|
@@ -257,7 +262,7 @@ class Client {
|
|
257
262
|
const emojiId = message.body.replace(new RegExp(ident, 'g'), "");
|
258
263
|
if (!emojiId)
|
259
264
|
return;
|
260
|
-
|
265
|
+
yield this._autoEmojiQ.add(() => __awaiter(this, void 0, void 0, function* () { return this.sendEmoji(message.from, emojiId, message.id).catch(() => { }); }));
|
261
266
|
}
|
262
267
|
}));
|
263
268
|
this._autoEmojiSet = true;
|
package/package.json
CHANGED