NIP-25: Add External Content Reactions (#2020)

This commit is contained in:
Oscar Merry
2025-08-22 17:44:53 +01:00
committed by GitHub
parent 0d7c5ef0f8
commit 84e0b44f93

28
25.md
View File

@@ -45,25 +45,39 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent, hint: S
}
```
Reactions to a website
External Content Reactions
---------------------
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.
If 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.
_Reacting to a website:_
```jsonc
{
"kind": 17,
"content": "⭐",
"tags": [
["r", "https://example.com/"]
["k", "web"],
["i", "https://example.com"]
],
// other fields...
}
```
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.
A fragment MAY be attached to the URL, to react to a section of the page.
It should be noted that a URL with a fragment is not considered to be the same URL as the original.
_Reacting to a podcast episode:_
```jsonc
{
"kind": 17,
"content": "+",
"tags": [
["k", "podcast:guid"],
["i", "podcast:guid:917393e3-1b1e-5cef-ace4-edaa54e1f810", "https://fountain.fm/show/QRT0l2EfrKXNGDlRrmjL"],
["k", "podcast:item:guid"],
["i", "podcast:item:guid:PC20-229", "https://fountain.fm/episode/DQqBg5sD3qFGMCZoSuLF"]
],
}
```
Custom Emoji Reaction
---------------------