update "previous" stuff.

This commit is contained in:
fiatjaf 2024-01-19 20:38:18 -03:00
parent c9ff5f6312
commit dc290d51bc

10
29.md
View File

@ -24,9 +24,9 @@ Events sent by users to groups (chat messages, text notes, moderation events etc
## Timeline references
In order to not be used out of context, events sent to these groups may contain references to previous events seen from the same relay in the `previous` tag. The choice of which previous events to pick belongs to the clients.
In order to not be used out of context, events sent to these groups may contain references to previous events seen from the same relay in the `previous` tag. The choice of which previous events to pick belongs to the clients. The references are to be made using the first 8 characters (4 bytes) of any event in the last 50 events seen by the user in the relay, excluding events by themselves. There can be any number of references (including zero), but it's recommended that clients include at least 3 and that relays enforce this.
This is a hack to prevent messages from being broadcasted to external relays that have forks of one group out of context. Relays are expected to reject any events that contain timeline references to events not found in their own database. Clients must also check these to keep relays honest about them.
This is a hack to prevent messages from being broadcasted to external relays that have forks of one group out of context. Relays are expected to reject any events that contain timeline references to events not found in their own database. Clients should also check these to keep relays honest about them.
## Late publication
@ -47,7 +47,7 @@ This is the basic unit of a "microblog" root text note sent to a group.
"content": "hello my friends lovers of pizza",
"tags": [
["h", "<group-id>"],
["previous", "<event-id>", "<event-id>", ...]
["previous", "<event-id-first-chars>", "<event-id-first-chars>", ...]
]
...
```
@ -62,7 +62,7 @@ This is the basic unit of a "microblog" reply note sent to a group.
"tags": [
["h", "<group-id>"],
["e", "<reply-event-id>", "", "root"],
["previous", "<event-id>", "<event-id>", ...]
["previous", "<event-id-first-chars>", "<event-id-first-chars>", ...]
]
...
```
@ -81,7 +81,7 @@ Similar to `kind:11`, this is the basic unit of a chat message sent to a group.
"content": "hello my friends lovers of pizza",
"tags": [
["h", "<group-id>"],
["previous", "<event-id>", "<event-id>", ...]
["previous", "<event-id-first-chars>", "<event-id-first-chars>", ...]
]
...
```