mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
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>
This commit is contained in:
parent
6de688f459
commit
744bce8fca
20
25.md
20
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
|
||||
---------------------
|
||||
|
||||
|
|
|
@ -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) |
|
||||
|
|
Loading…
Reference in New Issue
Block a user