upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOscar Merry <MerryOscar@users.noreply.github.com>2025-08-22 17:44:53 +0100
committerGitHub <noreply@github.com>2025-08-22 09:44:53 -0700
commit84e0b44f93c472af022bd4dcd2d72cb8ab2ea74c (patch)
treebadba6b714f93f63a3ed581a2cb7965dc9fa43c4
parent0d7c5ef0f8569ee3da542f2392424b1c9f14a7d9 (diff)
NIP-25: Add External Content Reactions (#2020)
-rw-r--r--25.md28
1 files changed, 21 insertions, 7 deletions
diff --git a/25.md b/25.md
index e0db86a..7ac4fb1 100644
--- a/25.md
+++ b/25.md
@@ -45,25 +45,39 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent, hint: S
45} 45}
46``` 46```
47 47
48Reactions to a website 48External Content Reactions
49--------------------- 49---------------------
50 50
51If 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. 51If the target of a reaction is not a native nostr event, the reaction MUST be a `kind 17` event and MUST include [NIP-73](73.md) external content `k` + `i` tags to properly reference the content.
52 52
53_Reacting to a website:_
53```jsonc 54```jsonc
54{ 55{
55 "kind": 17, 56 "kind": 17,
56 "content": "⭐", 57 "content": "⭐",
57 "tags": [ 58 "tags": [
58 ["r", "https://example.com/"] 59 ["k", "web"],
60 ["i", "https://example.com"]
59 ], 61 ],
60 // other fields...
61} 62}
62``` 63```
63 64
64URLs SHOULD be [normalized](https://datatracker.ietf.org/doc/html/rfc3986#section-6), so that reactions to the same website are not omitted from queries. 65_Reacting to a podcast episode:_
65A fragment MAY be attached to the URL, to react to a section of the page. 66```jsonc
66It should be noted that a URL with a fragment is not considered to be the same URL as the original. 67{
68 "kind": 17,
69 "content": "+",
70 "tags": [
71 ["k", "podcast:guid"],
72 ["i", "podcast:guid:917393e3-1b1e-5cef-ace4-edaa54e1f810", "https://fountain.fm/show/QRT0l2EfrKXNGDlRrmjL"],
73 ["k", "podcast:item:guid"],
74 ["i", "podcast:item:guid:PC20-229", "https://fountain.fm/episode/DQqBg5sD3qFGMCZoSuLF"]
75 ],
76}
77```
78
79
80
67 81
68Custom Emoji Reaction 82Custom Emoji Reaction
69--------------------- 83---------------------