diff options
| -rw-r--r-- | 25.md | 28 |
1 files changed, 21 insertions, 7 deletions
| @@ -45,25 +45,39 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent, hint: S | |||
| 45 | } | 45 | } |
| 46 | ``` | 46 | ``` |
| 47 | 47 | ||
| 48 | Reactions to a website | 48 | External Content Reactions |
| 49 | --------------------- | 49 | --------------------- |
| 50 | 50 | ||
| 51 | 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. | 51 | 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. |
| 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 | ||
| 64 | 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. | 65 | _Reacting to a podcast episode:_ |
| 65 | A fragment MAY be attached to the URL, to react to a section of the page. | 66 | ```jsonc |
| 66 | It 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 | ||
| 68 | Custom Emoji Reaction | 82 | Custom Emoji Reaction |
| 69 | --------------------- | 83 | --------------------- |