diff options
| author | Don <496156+nikolat@users.noreply.github.com> | 2024-08-09 00:36:08 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-08 12:36:08 -0300 |
| commit | 744bce8fcae0aca07b936b6662db635c8b4253dd (patch) | |
| tree | e8a7688caf4ed7b8896ebc8644004d8a1bc2d4b9 /25.md | |
| parent | 6de688f4594aa2c22b348669bdca6a503a6bf568 (diff) | |
NIP-25: reactions to a website (#1381)
* NIP-25: reactions to a website
* add note about URL normalization
---------
Co-authored-by: fiatjaf_ <fiatjaf@gmail.com>
Diffstat (limited to '25.md')
| -rw-r--r-- | 25.md | 20 |
1 files changed, 20 insertions, 0 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 | ||