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:
Don
2024-08-09 00:36:08 +09:00
committed by GitHub
parent 6de688f459
commit 744bce8fca
2 changed files with 22 additions and 1 deletions

20
25.md
View File

@@ -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
---------------------