diff --git a/25.md b/25.md index 17c203e1..f0386034 100644 --- a/25.md +++ b/25.md @@ -52,6 +52,26 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> Nost } ``` +Reactions to a website +--------------------- + +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. + +```json +{ + "kind": 17, + "content": "⭐", + "tags": [ + ["r", "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. + Custom Emoji Reaction --------------------- diff --git a/README.md b/README.md index 6c83ba88..d6840fcd 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `13` | Seal | [59](59.md) | | `14` | Direct Message | [17](17.md) | | `16` | Generic Repost | [18](18.md) | +| `17` | Reaction to a website | [25](25.md) | | `40` | Channel Creation | [28](28.md) | | `41` | Channel Metadata | [28](28.md) | | `42` | Channel Message | [28](28.md) | @@ -245,7 +246,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `L` | label namespace | -- | [32](32.md) | | `m` | MIME type | -- | [94](94.md) | | `q` | event id (hex) | relay URL | [18](18.md) | -| `r` | a reference (URL, etc) | petname | [24](24.md) | +| `r` | a reference (URL, etc) | -- | [24](24.md), [25](25.md) | | `r` | relay url | marker | [65](65.md) | | `t` | hashtag | -- | | | `alt` | summary | -- | [31](31.md) |