diff options
| -rw-r--r-- | 25.md | 20 | ||||
| -rw-r--r-- | README.md | 3 |
2 files changed, 22 insertions, 1 deletions
| @@ -52,6 +52,26 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> Nost | |||
| 52 | } | 52 | } |
| 53 | ``` | 53 | ``` |
| 54 | 54 | ||
| 55 | Reactions to a website | ||
| 56 | --------------------- | ||
| 57 | |||
| 58 | 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. | ||
| 59 | |||
| 60 | ```json | ||
| 61 | { | ||
| 62 | "kind": 17, | ||
| 63 | "content": "⭐", | ||
| 64 | "tags": [ | ||
| 65 | ["r", "https://example.com/"] | ||
| 66 | ], | ||
| 67 | ...other fields | ||
| 68 | } | ||
| 69 | ``` | ||
| 70 | |||
| 71 | 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. | ||
| 72 | A fragment MAY be attached to the URL, to react to a section of the page. | ||
| 73 | It should be noted that a URL with a fragment is not considered to be the same URL as the original. | ||
| 74 | |||
| 55 | Custom Emoji Reaction | 75 | Custom Emoji Reaction |
| 56 | --------------------- | 76 | --------------------- |
| 57 | 77 | ||
| @@ -109,6 +109,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | |||
| 109 | | `13` | Seal | [59](59.md) | | 109 | | `13` | Seal | [59](59.md) | |
| 110 | | `14` | Direct Message | [17](17.md) | | 110 | | `14` | Direct Message | [17](17.md) | |
| 111 | | `16` | Generic Repost | [18](18.md) | | 111 | | `16` | Generic Repost | [18](18.md) | |
| 112 | | `17` | Reaction to a website | [25](25.md) | | ||
| 112 | | `40` | Channel Creation | [28](28.md) | | 113 | | `40` | Channel Creation | [28](28.md) | |
| 113 | | `41` | Channel Metadata | [28](28.md) | | 114 | | `41` | Channel Metadata | [28](28.md) | |
| 114 | | `42` | Channel Message | [28](28.md) | | 115 | | `42` | Channel Message | [28](28.md) | |
| @@ -245,7 +246,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | |||
| 245 | | `L` | label namespace | -- | [32](32.md) | | 246 | | `L` | label namespace | -- | [32](32.md) | |
| 246 | | `m` | MIME type | -- | [94](94.md) | | 247 | | `m` | MIME type | -- | [94](94.md) | |
| 247 | | `q` | event id (hex) | relay URL | [18](18.md) | | 248 | | `q` | event id (hex) | relay URL | [18](18.md) | |
| 248 | | `r` | a reference (URL, etc) | petname | [24](24.md) | | 249 | | `r` | a reference (URL, etc) | -- | [24](24.md), [25](25.md) | |
| 249 | | `r` | relay url | marker | [65](65.md) | | 250 | | `r` | relay url | marker | [65](65.md) | |
| 250 | | `t` | hashtag | -- | | | 251 | | `t` | hashtag | -- | | |
| 251 | | `alt` | summary | -- | [31](31.md) | | 252 | | `alt` | summary | -- | [31](31.md) | |