diff options
| author | Francisco Calderón <fjcalderon@gmail.com> | 2024-11-04 15:39:21 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-04 15:39:21 -0300 |
| commit | 03f3bc39678262ecbd5d870c9da44723023557ff (patch) | |
| tree | e75ecf32d3bc906a8b26314488a1ae90996169c1 /25.md | |
| parent | f72a2f69ed93cf442e83bf9e7e16f6c06da40384 (diff) | |
| parent | 6bcd89c097e97e65dbc95e7c6b7b8348e8dd6b5c (diff) | |
Merge branch 'master' into p2p-nip
Diffstat (limited to '25.md')
| -rw-r--r-- | 25.md | 24 |
1 files changed, 22 insertions, 2 deletions
| @@ -52,6 +52,26 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> Nost | |||
| 52 | } | 52 | } |
| 53 | ``` | 53 | ``` |
| 54 | 54 | ||
| 55 | Reactions to a website | ||
| 56 | --------------------- | ||
| 57 | |||
| 58 | If the target of the reaction is a website, the reaction MUST be a `kind 17` event and MUST include an `r` tag with the website's URL. | ||
| 59 | |||
| 60 | ```jsonc | ||
| 61 | { | ||
| 62 | "kind": 17, | ||
| 63 | "content": "⭐", | ||
| 64 | "tags": [ | ||
| 65 | ["r", "https://example.com/"] | ||
| 66 | ], | ||
| 67 | // other fields... | ||
| 68 | } | ||
| 69 | ``` | ||
| 70 | |||
| 71 | URLs SHOULD be [normalized](https://datatracker.ietf.org/doc/html/rfc3986#section-6), so that reactions to the same website are not omitted from queries. | ||
| 72 | A fragment MAY be attached to the URL, to react to a section of the page. | ||
| 73 | It should be noted that a URL with a fragment is not considered to be the same URL as the original. | ||
| 74 | |||
| 55 | Custom Emoji Reaction | 75 | Custom Emoji Reaction |
| 56 | --------------------- | 76 | --------------------- |
| 57 | 77 | ||
| @@ -59,14 +79,14 @@ The client may specify a custom emoji ([NIP-30](30.md)) `:shortcode:` in the | |||
| 59 | reaction content. The client should refer to the emoji tag and render the | 79 | reaction content. The client should refer to the emoji tag and render the |
| 60 | content as an emoji if shortcode is specified. | 80 | content as an emoji if shortcode is specified. |
| 61 | 81 | ||
| 62 | ```json | 82 | ```jsonc |
| 63 | { | 83 | { |
| 64 | "kind": 7, | 84 | "kind": 7, |
| 65 | "content": ":soapbox:", | 85 | "content": ":soapbox:", |
| 66 | "tags": [ | 86 | "tags": [ |
| 67 | ["emoji", "soapbox", "https://gleasonator.com/emoji/Gleasonator/soapbox.png"] | 87 | ["emoji", "soapbox", "https://gleasonator.com/emoji/Gleasonator/soapbox.png"] |
| 68 | ], | 88 | ], |
| 69 | ...other fields | 89 | // other fields... |
| 70 | } | 90 | } |
| 71 | ``` | 91 | ``` |
| 72 | 92 | ||