upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon <496156+nikolat@users.noreply.github.com>2024-08-09 00:36:08 +0900
committerGitHub <noreply@github.com>2024-08-08 12:36:08 -0300
commit744bce8fcae0aca07b936b6662db635c8b4253dd (patch)
treee8a7688caf4ed7b8896ebc8644004d8a1bc2d4b9
parent6de688f4594aa2c22b348669bdca6a503a6bf568 (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>
-rw-r--r--25.md20
-rw-r--r--README.md3
2 files changed, 22 insertions, 1 deletions
diff --git a/25.md b/25.md
index 17c203e..f038603 100644
--- a/25.md
+++ b/25.md
@@ -52,6 +52,26 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> Nost
52} 52}
53``` 53```
54 54
55Reactions to a website
56---------------------
57
58If 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
71URLs SHOULD be [normalized](https://datatracker.ietf.org/doc/html/rfc3986#section-6), so that reactions to the same website are not omitted from queries.
72A fragment MAY be attached to the URL, to react to a section of the page.
73It should be noted that a URL with a fragment is not considered to be the same URL as the original.
74
55Custom Emoji Reaction 75Custom Emoji Reaction
56--------------------- 76---------------------
57 77
diff --git a/README.md b/README.md
index 6c83ba8..d6840fc 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
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) |