events cannot really be replaced

clarifying what it means to "replace an event"
This commit is contained in:
Leo Wandersleb 2023-03-26 12:10:29 -03:00
parent 39e3c1b926
commit b6f8a6e79b
No known key found for this signature in database
GPG Key ID: 90B2F570DA9B91E4
2 changed files with 7 additions and 3 deletions

4
16.md
View File

@ -16,7 +16,9 @@ Upon a regular event being received, the relay SHOULD send it to all clients wit
Replaceable Events Replaceable Events
------------------ ------------------
A *replaceable event* is defined as an event with a kind `10000 <= n < 20000`. A *replaceable event* is defined as an event with a kind `10000 <= n < 20000`.
Upon a replaceable event with a newer timestamp than the currently known latest replaceable event with the same kind being received, and signed by the same key, the old event SHOULD be discarded and replaced with the newer event. Upon a replaceable event with a newer timestamp than the currently known latest replaceable event with the same kind and author being received, the old event SHOULD be discarded,
effectively replacing what gets returned when querying for
`author:kind` tuples.
Ephemeral Events Ephemeral Events
---------------- ----------------

6
33.md
View File

@ -14,8 +14,10 @@ The value of a tag is defined as the first parameter of a tag after the tag name
A *parameterized replaceable event* is defined as an event with a kind `30000 <= n < 40000`. A *parameterized replaceable event* is defined as an event with a kind `30000 <= n < 40000`.
Upon a parameterized replaceable event with a newer timestamp than the currently known latest Upon a parameterized replaceable event with a newer timestamp than the currently known latest
replaceable event with the same kind and first `d` tag value being received, the old event replaceable event with the same kind, author and first `d` tag value being received, the old event
SHOULD be discarded and replaced with the newer event. SHOULD be discarded, effectively replacing what gets returned when querying for
`author:kind:d-tag` tuples.
A missing or a `d` tag with no value should be interpreted equivalent to a `d` tag with the A missing or a `d` tag with no value should be interpreted equivalent to a `d` tag with the
value as an empty string. Events from the same author with any of the following `tags` value as an empty string. Events from the same author with any of the following `tags`
replace each other: replace each other: