mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-26 22:05:18 +00:00
Persist authenticated private-media delivery receipts (#1466)
Adds a durable receiver-side ledger (BLEPrivateMediaReceiptStore) mapping a deterministic private-media message ID — hash-bound to sender, recipient, and entropy-bearing filename — to the stored file before UI delivery and before the Noise-encrypted delivery ACK, so sender retries and relaunches cannot create duplicate bubbles or files. Receipts are unforgeable without the Noise session; capability bit 9 rides the existing announce bitfield (no wire-format change; rolling upgrade safe both directions). Includes review fixes: corrupt receipt records are quarantined per-record (bytes preserved at <id>.json.corrupt, only that ID fail-closed — previously one bad record silently disabled ALL inbound private media forever); the panic reset now reaches BLEService's own store instance via completePanicReset with a production-wiring test; and both content.delivery.reason.* strings ship with full 30-locale coverage.
This commit is contained in:
@@ -28,6 +28,13 @@ peer's Noise session before BLE fragmentation.
|
||||
`0x21`. A valid bit-8 proof selects Noise `0x20`; a valid no-bit proof or a
|
||||
no-proof timeout reaches the explicit legacy-consent path for an unpinned
|
||||
peer. No timeout automatically sends raw bytes.
|
||||
- `PeerCapabilities.privateMediaReceipts` is bit 9. Its exact-session
|
||||
authenticated proof enables bounded sender-side automatic retry; a public
|
||||
announce never does. It does not replace bit 8: encrypted `0x20` media from
|
||||
bit-8-only prior iOS clients keeps the same deterministic stable ID and
|
||||
delivery ACK. Receivers durably commit that ID before UI delivery or ACK, so
|
||||
a lost proof followed by a later bit-9 retry cannot create a second,
|
||||
random-ID bubble.
|
||||
- An unpinned peer with a stable Noise key but without that capability is
|
||||
eligible for one signed, directed
|
||||
`fileTransfer`, matching the pre-migration wire form used by older iOS and
|
||||
|
||||
Reference in New Issue
Block a user