@oxidezap/baileyrs 0.2.9 → 0.2.10
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 +13 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -243,6 +243,19 @@ A few behaviors that differ from upstream — almost always to your advantage:
|
|
|
243
243
|
`connectTimeoutMs`, `qrTimeout`, `printQRInTerminal`, `ignoreOfflineMessages`,
|
|
244
244
|
`downloadHistory`, `agent`, `fetchAgent`, `mobile`, `mediaCache`,
|
|
245
245
|
`userDevicesCache`, `callOfferCache` and `placeholderResendCache`.
|
|
246
|
+
- **A sender's resend reaches you once, not once per delivery.** When a
|
|
247
|
+
sender's network is bad, their client re-runs its own outbox and sends the
|
|
248
|
+
same message again — same `key.id`, re-encrypted. Upstream Baileys emits a
|
|
249
|
+
`messages.upsert` for each of those deliveries, so an auto-reply bot answers
|
|
250
|
+
the same message two or three times; the engine now recognises the repeat and
|
|
251
|
+
emits one. It is a short-lived, in-memory window (five minutes), so the one
|
|
252
|
+
case still open is a sender whose retry spans a restart of your process. If
|
|
253
|
+
your handler has side effects, keying them on the whole `key` — `remoteJid`,
|
|
254
|
+
`id`, `fromMe` and `participant` — remains the thing that makes it safe. Not
|
|
255
|
+
on `id` alone: the id is the sending client's to choose, so two participants
|
|
256
|
+
of one group can pick the same one, and a handler that keys on it would drop
|
|
257
|
+
the second person's message rather than a duplicate. That is why the engine's
|
|
258
|
+
own check carries the sender too.
|
|
246
259
|
- **`Boom` ships in the box.** baileyrs exports its own
|
|
247
260
|
`@hapi/boom`-compatible `Boom`, so the existing
|
|
248
261
|
`(err as Boom).output.statusCode` pattern works unchanged. If your
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxidezap/baileyrs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.10",
|
|
5
5
|
"description": "A Rust-powered WhatsApp Web library for JavaScript, with a Baileys-compatible API",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"whatsapp",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@hapi/boom": "^9.1.4",
|
|
85
|
-
"@oxidezap/whatsapp-rust-bridge": "0.
|
|
85
|
+
"@oxidezap/whatsapp-rust-bridge": "0.19.0",
|
|
86
86
|
"long": "^5.3.2",
|
|
87
87
|
"pino": "^10.3.1",
|
|
88
88
|
"protobufjs": "^7.6.5"
|