upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/25.md
diff options
context:
space:
mode:
authorFrancisco Calderón <fjcalderon@gmail.com>2024-11-04 15:39:21 -0300
committerGitHub <noreply@github.com>2024-11-04 15:39:21 -0300
commit03f3bc39678262ecbd5d870c9da44723023557ff (patch)
treee75ecf32d3bc906a8b26314488a1ae90996169c1 /25.md
parentf72a2f69ed93cf442e83bf9e7e16f6c06da40384 (diff)
parent6bcd89c097e97e65dbc95e7c6b7b8348e8dd6b5c (diff)
Merge branch 'master' into p2p-nip
Diffstat (limited to '25.md')
-rw-r--r--25.md24
1 files changed, 22 insertions, 2 deletions
diff --git a/25.md b/25.md
index 17c203e..671c55f 100644
--- a/25.md
+++ b/25.md
@@ -52,6 +52,26 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> Nost
52} 52}
53``` 53```
54 54
55Reactions to a website
56---------------------
57
58If 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
71URLs SHOULD be [normalized](https://datatracker.ietf.org/doc/html/rfc3986#section-6), so that reactions to the same website are not omitted from queries.
72A fragment MAY be attached to the URL, to react to a section of the page.
73It should be noted that a URL with a fragment is not considered to be the same URL as the original.
74
55Custom Emoji Reaction 75Custom Emoji Reaction
56--------------------- 76---------------------
57 77
@@ -59,14 +79,14 @@ The client may specify a custom emoji ([NIP-30](30.md)) `:shortcode:` in the
59reaction content. The client should refer to the emoji tag and render the 79reaction content. The client should refer to the emoji tag and render the
60content as an emoji if shortcode is specified. 80content 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