mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
deleting-replaceables
This commit is contained in:
parent
85df9b0e89
commit
0535f01508
9
09.md
9
09.md
|
@ -14,14 +14,13 @@ The event's `content` field MAY contain a text note describing the reason for th
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```
|
```jsonc
|
||||||
{
|
{
|
||||||
"kind": 5,
|
"kind": 5,
|
||||||
"pubkey": <32-bytes hex-encoded public key of the event creator>,
|
"pubkey": <32-bytes hex-encoded public key of the event creator>,
|
||||||
"tags": [
|
"tags": [
|
||||||
["e", "dcd59..464a2"],
|
["e", "dcd59..464a2"],
|
||||||
["e", "968c5..ad7a4"],
|
["e", "968c5..ad7a4"],
|
||||||
["a", "<kind>:<pubkey>:<d-identifier>"]
|
|
||||||
],
|
],
|
||||||
"content": "these posts were published by accident",
|
"content": "these posts were published by accident",
|
||||||
...other fields
|
...other fields
|
||||||
|
@ -47,3 +46,9 @@ Relays MAY validate that a deletion event only references events that have the s
|
||||||
## Deleting a Deletion
|
## Deleting a Deletion
|
||||||
|
|
||||||
Publishing a deletion event against a deletion has no effect. Clients and relays are not obliged to support "undelete" functionality.
|
Publishing a deletion event against a deletion has no effect. Clients and relays are not obliged to support "undelete" functionality.
|
||||||
|
|
||||||
|
## Deleting Replaceable Events
|
||||||
|
|
||||||
|
Because of their changing nature it's hard to get rid of all instance of a replaceable event (ranges `10000...19999` and `30000...39999`). We also don't want to publish a `kind:5` targeting an `a` reference and thus permanently delete any future events that could possibly have the same specifieds `kind` and `d`-tag forever.
|
||||||
|
|
||||||
|
So instead to delete a replaceable event we **overwrite** it with an event with the same `kind` and `d`-tag, plus a tag `["deleted"]` specifying no other tags.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user