Expand description
Message deletion — Vector’s “delete from network” capability.
NIP-17 DMs are wrapped in kind-1059 gift-wrap events signed by an ephemeral key. The standard NIP-59 implementation discards that key after signing, making the wrap permanently un-deletable: privacy by obscurity, since the wrap continues to sit on inbox relays decryptable by anyone with the recipient key.
Vector retains the ephemeral key (see db::nip17_keys) so that on
user request we can publish an author-signed NIP-09 deletion against
every wrap and have relays drop it. Privacy by control.
Scope: this module deletes the user’s own outbound messages. It does not (and cannot) delete messages sent by others — those wraps were signed by ephemeral keys we never held.
Structs§
- Delete
Outcome - Outcome of a delete-own-* operation.
Functions§
- delete_
cached_ attachment_ files_ pub - Best-effort delete of every cached attachment file for a message.
Only unlinks files that canonicalize to a path under Vector’s
managed download directory — files the user has moved or copied
elsewhere are never touched. Symlink and
..escape attempts are rejected by the canonicalize check. - delete_
own_ dm - Delete an outbound DM from the network by publishing NIP-09
deletions against every retained gift-wrap for
rumor_id. - delete_
own_ reaction - Revoke one of OUR OWN DM reactions. Mirrors
delete_own_dmbut the target is a kind-7 reaction rumor: Layer 1 nukes each retained gift-wrap from its relays via the stored ephemeral key; Layer 2 sends a cooperative hide (k=7) to the counterpart + self so live clients drop the chip. No Blossom layer — reactions carry no attachments.recipientis the DM counterpart, used for the cooperative hide when no recipient-role wrap key is retained (e.g. only the self-wrap survived). - filter_
unreferenced_ attachments - Filter
attachmentsdown to those NOT referenced by any OTHER undeleted message in STATE.