upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/09.md
diff options
context:
space:
mode:
Diffstat (limited to '09.md')
-rw-r--r--09.md36
1 files changed, 20 insertions, 16 deletions
diff --git a/09.md b/09.md
index fbbd6e1..23ffeab 100644
--- a/09.md
+++ b/09.md
@@ -1,49 +1,53 @@
1NIP-09 1NIP-09
2====== 2======
3 3
4Event Deletion 4Event Deletion Request
5-------------- 5----------------------
6 6
7`draft` `optional` 7`draft` `optional`
8 8
9A special event with kind `5`, meaning "deletion" is defined as having a list of one or more `e` tags, each referencing an event the author is requesting to be deleted. 9A special event with kind `5`, meaning "deletion request" is defined as having a list of one or more `e` or `a` tags, each referencing an event the author is requesting to be deleted. Deletion requests SHOULD include a `k` tag for the kind of each event being requested for deletion.
10 10
11Each tag entry must contain an "e" event id and/or `a` tags intended for deletion. 11The event's `content` field MAY contain a text note describing the reason for the deletion request.
12
13The event's `content` field MAY contain a text note describing the reason for the deletion.
14 12
15For example: 13For example:
16 14
17``` 15```jsonc
18{ 16{
19 "kind": 5, 17 "kind": 5,
20 "pubkey": <32-bytes hex-encoded public key of the event creator>, 18 "pubkey": <32-bytes hex-encoded public key of the event creator>,
21 "tags": [ 19 "tags": [
22 ["e", "dcd59..464a2"], 20 ["e", "dcd59..464a2"],
23 ["e", "968c5..ad7a4"], 21 ["e", "968c5..ad7a4"],
24 ["a", "<kind>:<pubkey>:<d-identifier>"] 22 ["a", "<kind>:<pubkey>:<d-identifier>"],
23 ["k", "1"],
24 ["k", "30023"]
25 ], 25 ],
26 "content": "these posts were published by accident", 26 "content": "these posts were published by accident",
27 ...other fields 27 // other fields...
28} 28}
29``` 29```
30 30
31Relays SHOULD delete or stop publishing any referenced events that have an identical `pubkey` as the deletion request. Clients SHOULD hide or otherwise indicate a deletion status for referenced events. 31Relays SHOULD delete or stop publishing any referenced events that have an identical `pubkey` as the deletion request. Clients SHOULD hide or otherwise indicate a deletion request status for referenced events.
32 32
33Relays SHOULD continue to publish/share the deletion events indefinitely, as clients may already have the event that's intended to be deleted. Additionally, clients SHOULD broadcast deletion events to other relays which don't have it. 33Relays SHOULD continue to publish/share the deletion request events indefinitely, as clients may already have the event that's intended to be deleted. Additionally, clients SHOULD broadcast deletion request events to other relays which don't have it.
34
35When an `a` tag is used, relays SHOULD delete all versions of the replaceable event up to the `created_at` timestamp of the deletion request event.
34 36
35## Client Usage 37## Client Usage
36 38
37Clients MAY choose to fully hide any events that are referenced by valid deletion events. This includes text notes, direct messages, or other yet-to-be defined event kinds. Alternatively, they MAY show the event along with an icon or other indication that the author has "disowned" the event. The `content` field MAY also be used to replace the deleted events' own content, although a user interface should clearly indicate that this is a deletion reason, not the original content. 39Clients MAY choose to fully hide any events that are referenced by valid deletion request events. This includes text notes, direct messages, or other yet-to-be defined event kinds. Alternatively, they MAY show the event along with an icon or other indication that the author has "disowned" the event. The `content` field MAY also be used to replace the deleted events' own content, although a user interface should clearly indicate that this is a deletion request reason, not the original content.
38 40
39A client MUST validate that each event `pubkey` referenced in the `e` tag of the deletion request is identical to the deletion request `pubkey`, before hiding or deleting any event. Relays can not, in general, perform this validation and should not be treated as authoritative. 41A client MUST validate that each event `pubkey` referenced in the `e` tag of the deletion request is identical to the deletion request `pubkey`, before hiding or deleting any event. Relays can not, in general, perform this validation and should not be treated as authoritative.
40 42
41Clients display the deletion event itself in any way they choose, e.g., not at all, or with a prominent notice. 43Clients display the deletion request event itself in any way they choose, e.g., not at all, or with a prominent notice.
44
45Clients MAY choose to inform the user that their request for deletion does not guarantee deletion because it is impossible to delete events from all relays and clients.
42 46
43## Relay Usage 47## Relay Usage
44 48
45Relays MAY validate that a deletion event only references events that have the same `pubkey` as the deletion itself, however this is not required since relays may not have knowledge of all referenced events. 49Relays MAY validate that a deletion request event only references events that have the same `pubkey` as the deletion request itself, however this is not required since relays may not have knowledge of all referenced events.
46 50
47## Deleting a Deletion 51## Deletion Request of a Deletion Request
48 52
49Publishing a deletion event against a deletion has no effect. Clients and relays are not obliged to support "undelete" functionality. 53Publishing a deletion request event against a deletion request has no effect. Clients and relays are not obliged to support "unrequest deletion" functionality.