aunubaileys 1.0.28 โ 1.0.29
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/README.md +4 -0
- package/lib/Socket/messages-recv.js +13 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,6 +64,10 @@ Everything else is pure upstream. When upstream moves, we rebase the patch layer
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
+
### ๐ What's new in 1.0.29 / Baru di 1.0.29
|
|
68
|
+
|
|
69
|
+
- ๐งน **Resend counters are now cleared when the retry limit is reached** โ every message a peer asked us to resend left a permanent counter entry in the retry cache, removed only by the cache TTL (1h on the default cache โ nothing at all on a consumer store without TTL), so entries accumulated without bound in a long-lived bot. The entry is now deleted when its count hits the limit, exactly like `sendRetryRequest` already does on the decrypt-retry path.
|
|
70
|
+
|
|
67
71
|
### ๐ What's new in 1.0.28 / Baru di 1.0.28
|
|
68
72
|
|
|
69
73
|
- ๐ฑ **Device lists no longer go stale after a device is linked or unlinked** โ the server pushes a `devices` notification on such changes, but upstream only logged its own list and ignored everyone else's, so sends kept encrypting for the cached device set until the 5-minute TTL expired: a newly linked device received nothing and a removed device kept getting ciphertext. The notification now invalidates that user's cached entry, so the next send re-queries USync for the fresh list. The cache is also exposed as `sock.userDevicesCache` for explicit invalidation.
|
|
@@ -493,7 +493,19 @@ export const makeMessagesRecvSocket = (config) => {
|
|
|
493
493
|
const updateSendMessageAgainCount = (id, participant) => {
|
|
494
494
|
const key = `${id}:${participant}`;
|
|
495
495
|
const newValue = (msgRetryCache.get(key) || 0) + 1;
|
|
496
|
-
|
|
496
|
+
// AunuBaileys: clear the entry when the limit is reached, exactly
|
|
497
|
+
// like sendRetryRequest already does on its path. This path never
|
|
498
|
+
// deleted anything, so every message a peer ever asked us to
|
|
499
|
+
// resend left a permanent counter entry that only the cache TTL
|
|
500
|
+
// (1h on the default cache โ and nothing at all on a consumer
|
|
501
|
+
// store without TTL) ever removed: unbounded growth in a
|
|
502
|
+
// long-lived bot process.
|
|
503
|
+
if (newValue >= maxMsgRetryCount) {
|
|
504
|
+
msgRetryCache.del(key);
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
msgRetryCache.set(key, newValue);
|
|
508
|
+
}
|
|
497
509
|
};
|
|
498
510
|
const sendMessagesAgain = async (key, ids, retryNode, sessionPreInjected = false) => {
|
|
499
511
|
const msgs = await Promise.all(ids.map(async (id) => (await getMessage({ ...key, id })) ?? sentMessageCacheFor(config).get(key.remoteJid, id)));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aunubaileys",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.29",
|
|
5
5
|
"description": "AunuBaileys \u2014 a WhatsApp Web API for bots that never sleep. Full upstream power with the beloved in-memory store restored and pairing that just works. Forged by AunuCore.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"whatsapp",
|