aunubaileys 1.0.30 → 1.0.31

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 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.31 / Baru di 1.0.31
68
+
69
+ - 📜 **History-sync record list no longer grows without bound in creds** — every history-sync notification appended an entry to `creds.processedHistoryMessages`, yet nothing anywhere reads those entries (the single read is an emptiness check for `isLatest`). The list lives in creds, so each entry bloated creds.json and was spread-copied and re-serialized on every save for the life of the account. Only the most recent 50 entries are now kept; `isLatest` semantics are unchanged.
70
+
67
71
  ### 🆕 What's new in 1.0.30 / Baru di 1.0.30
68
72
 
69
73
  - 🟢 **Presence no longer vanishes across the LID/PN identity split** — presence stanzas increasingly arrive LID-addressed while consumers keyed the participant by phone-number JID (or the reverse), so their lookup missed and the contact looked permanently offline / never typing. When the LID store knows the pair, `presence.update` now also carries the presence under the alternate participant form; the original entry is unchanged.
@@ -160,9 +160,17 @@ const processMessage = async (message, { shouldProcessHistoryMsg, placeholderRes
160
160
  }, 'got history notification');
161
161
  if (process) {
162
162
  if (histNotification.syncType !== proto.HistorySync.HistorySyncType.ON_DEMAND) {
163
+ // AunuBaileys: keep only the most recent 50 entries.
164
+ // Upstream appended forever, and nothing anywhere
165
+ // reads the entries — the single read is the
166
+ // emptiness check for `isLatest` above. The list
167
+ // lives in creds, so every entry also bloats
168
+ // creds.json and is re-serialized (and spread-copied
169
+ // here) on every save for the life of the account.
170
+ const prevProcessed = creds.processedHistoryMessages || [];
163
171
  ev.emit('creds.update', {
164
172
  processedHistoryMessages: [
165
- ...(creds.processedHistoryMessages || []),
173
+ ...prevProcessed.slice(-49),
166
174
  { key: message.key, messageTimestamp: message.messageTimestamp }
167
175
  ]
168
176
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aunubaileys",
3
3
  "type": "module",
4
- "version": "1.0.30",
4
+ "version": "1.0.31",
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",