NIP-25: Add External Content Reactions (#2020)
This commit is contained in:
parent
0d7c5ef0f8
commit
84e0b44f93
28
25.md
28
25.md
|
@ -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
|
```jsonc
|
||||||
{
|
{
|
||||||
"kind": 17,
|
"kind": 17,
|
||||||
"content": "⭐",
|
"content": "⭐",
|
||||||
"tags": [
|
"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.
|
_Reacting to a podcast episode:_
|
||||||
A fragment MAY be attached to the URL, to react to a section of the page.
|
```jsonc
|
||||||
It should be noted that a URL with a fragment is not considered to be the same URL as the original.
|
{
|
||||||
|
"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
|
Custom Emoji Reaction
|
||||||
---------------------
|
---------------------
|
||||||
|
|
Loading…
Reference in New Issue