Make it more clear how to deal with the public event

This commit is contained in:
arthurfranca 2024-02-14 22:21:36 -03:00
parent 66c5eb20bb
commit bbd72d122d

21
00.md
View File

@ -14,11 +14,16 @@ A public event (with no access control), such as of `kind:1`,
must be published or updated with a `full_event` tag pointing to a
`kind:40042` event address.
It's data should be set to a preview version of the full event. For example, a `kind:1063` of an image file
could set the `url` tag to a blurred version of the image, while a `kind:1` event should
set `.content` to a text excerpt of the full text such as "This is the first sentence of the full text. This text is trimmed...".
It's data should be set to a warning that the event is private or to a preview version of the full event, in case the
goal is to tease an user to pay for content, for example.
This guarantees backwards compatibility for clients not aware of this NIP.
For example, a `kind:1` event could have it's `.content` set to "You don't have access to this event." to be showed
to users that don't have acces to the event or that are using a client that doesn't support this NIP. On the other hand,
if the goal is to convince an user to pay for the full event, the `.content` could be set to a text excerpt like the following:
"This is the first sentence of the full text. This text is trimmed to 5% of the character count of the full text..."
Taking the `kind:1063` metadata event of an image as an example, it could had set its `url` tag to a blurred version of the image
or simply use the `.content` (that according to NIP-94 means "caption") set to "You don't have access to this event".
Example:
@ -71,10 +76,14 @@ The client is expected to initially request the public event. For example, a mic
will request `kind:1` events as usual.
If one of these events includes a `full_event` tag,
the client should request it with a filter that includes
supporting clients should request it with a filter that includes
a `#A` filter key set to the client's user pubkey.
Clients that don't understand this NIP, however, will show the `kind:1` `.content` as usual
and ignore the `full_event` tag.
If the user has rights to access the full event, the relay will send it
after the NIP-42 authentication flow.
For example: `{ "kinds": [40042], "authors": ["abc"], #d: ["xyz"], "#A": ["<client's user pubkey>"], "limit": 1 }`
Example of how to request the full event:
`["REQ", "sub_id", { "kinds": [40042], "authors": ["abc"], #d: ["xyz"], "#A": ["<client's user pubkey>"], "limit": 1 }]`