aunubaileys 1.0.22 → 1.0.23

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.23 / Baru di 1.0.23
68
+
69
+ - 🖼️ **Old-media downloads recover from 403** — the phone re-upload recovery path for failed media downloads only triggered on HTTP 404/410, but WhatsApp's media CDN answers **403** when a message's directPath/url auth has expired — the common case for older media. Downloads of old media therefore failed permanently even though the sender's phone could heal them. 403 now triggers the re-upload request; if the media is truly gone, the re-upload fails as well and the original error propagates unchanged.
70
+
67
71
  ### 🆕 What's new in 1.0.22 / Baru di 1.0.22
68
72
 
69
73
  - 🗑️ **Cacheable key store honours deletions** — `makeCacheableSignalKeyStore` cached `null` values verbatim, but null means *deleted*: later gets returned a phantom present-but-null entry, and a value re-created in the store stayed hidden behind the cached null until the 5-minute TTL expired. Deletions now evict the cache entry, so the next get reads the store's authoritative state — which is exactly what makes `deleteSession`/`deleteSenderKey` (1.0.14/1.0.17) behave correctly through the recommended cacheable wiring. Both defects were reproduced before the fix and pass after it.
@@ -1073,7 +1073,12 @@ export const aggregateMessageKeysNotFromMe = (keys) => {
1073
1073
  }
1074
1074
  return Object.values(keyMap);
1075
1075
  };
1076
- const REUPLOAD_REQUIRED_STATUS = [410, 404];
1076
+ // AunuBaileys: 403 added — WhatsApp's media CDN answers 403 (not just 404/410)
1077
+ // when a message's directPath/url auth has expired, which is exactly the stale-
1078
+ // media case the phone re-upload exists for. Without it, downloads of older
1079
+ // media failed permanently even though the sender's phone could re-upload.
1080
+ // If the media is truly gone, the re-upload fails too and the error propagates.
1081
+ const REUPLOAD_REQUIRED_STATUS = [410, 404, 403];
1077
1082
  /**
1078
1083
  * Downloads the given message. Throws an error if it's not a media message
1079
1084
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aunubaileys",
3
3
  "type": "module",
4
- "version": "1.0.22",
4
+ "version": "1.0.23",
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",