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:
authorDon <496156+nikolat@users.noreply.github.com>2024-08-09 00:36:08 +0900
committerGitHub <noreply@github.com>2024-08-08 12:36:08 -0300
commit744bce8fcae0aca07b936b6662db635c8b4253dd (patch)
treee8a7688caf4ed7b8896ebc8644004d8a1bc2d4b9 /25.md
parent6de688f4594aa2c22b348669bdca6a503a6bf568 (diff)
NIP-25: reactions to a website (#1381)
* NIP-25: reactions to a website * add note about URL normalization --------- Co-authored-by: fiatjaf_ <fiatjaf@gmail.com>
Diffstat (limited to '25.md')
-rw-r--r--25.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/25.md b/25.md
index 17c203e..f038603 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```json
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