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. - filter_
unreferenced_ attachments - Filter
attachmentsdown to those NOT referenced by any OTHER undeleted message in STATE.