Better backwards compat

This commit is contained in:
arthurfranca 2024-02-14 19:52:20 -03:00
parent d52fd3bacd
commit 66c5eb20bb

11
00.md
View File

@ -14,8 +14,11 @@ 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 must be published or updated with a `full_event` tag pointing to a
`kind:40042` event address. `kind:40042` event address.
It may include one of the following tags holding a preview of the full event content: It's data should be set to a preview version of the full event. For example, a `kind:1063` of an image file
`summary`, `image`, `audio`, `video`. The first holds a text excerpt while the others an URL. 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...".
This guarantees backwards compatibility for clients not aware of this NIP.
Example: Example:
@ -24,7 +27,7 @@ Example:
"kind": 1063, "kind": 1063,
"tags": [ "tags": [
["full_event", "40042:<32-bytes lowercase hex of a pubkey>:abc", "<recommended relay URL, optional>"], ["full_event", "40042:<32-bytes lowercase hex of a pubkey>:abc", "<recommended relay URL, optional>"],
["image", "<string with preview URI>"], ["url", "<string with PREVIEW url>"],
["dim", "800x600"] ["dim", "800x600"]
], ],
"content": "", "content": "",
@ -74,4 +77,4 @@ a `#A` filter key set to the client's user pubkey.
If the user has rights to access the full event, the relay will send it If the user has rights to access the full event, the relay will send it
after the NIP-42 authentication flow. after the NIP-42 authentication flow.
For example: `{ kinds: [40042], authors: ["abc"], #d: ["xyz"], #A: ["<client's user pubkey>"], limit: 1 }` For example: `{ "kinds": [40042], "authors": ["abc"], #d: ["xyz"], "#A": ["<client's user pubkey>"], "limit": 1 }`