upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitor Pamplona <vitor@vitorpamplona.com>2023-06-15 10:03:07 -0400
committerfiatjaf_ <fiatjaf@gmail.com>2023-08-08 13:27:32 -0300
commit3a01861adeaf527f160e73b892b383a2c81a5c66 (patch)
tree0a03fb7901606b8465458db6ca84ea2fc91f1875
parent63441099be5898afc685bb2be28c2b30b2f27fc2 (diff)
Adds references to other NIPs with more information and standardizes citations to event kinds
-rw-r--r--172.md36
1 files changed, 18 insertions, 18 deletions
diff --git a/172.md b/172.md
index df78081..0c48ea3 100644
--- a/172.md
+++ b/172.md
@@ -6,11 +6,11 @@ Moderated Communities (Reddit Style)
6 6
7`draft` `optional` `author:vitorpamplona` `author:arthurfranca` 7`draft` `optional` `author:vitorpamplona` `author:arthurfranca`
8 8
9The goal of this NIP is to create moderator-approved public communities around a topic. It defines the replaceable event `34550` to define the community and the current list of moderators/administrators. Users that want to post into the community, simply tag any Nostr event with an `a` tag. Moderators issue an approval event `4550` that links the community with the new post. 9The goal of this NIP is to create moderator-approved public communities around a topic. It defines the replaceable event `kind:34550` to define the community and the current list of moderators/administrators. Users that want to post into the community, simply tag any Nostr event with the community's `a` tag (See [NIP-33](33.md)). Moderators issue an approval event `kind:4550` that links the community with the new post.
10 10
11# Community definition 11# Community definition
12 12
13Kind 34550 should include any field that helps define the community and the set of moderators. 13`Kind:34550` should include any field that helps define the community and the set of moderators.
14 14
15```js 15```js
16{ 16{
@@ -19,16 +19,16 @@ Kind 34550 should include any field that helps define the community and the set
19 "created_at": "<Unix timestamp in seconds>", 19 "created_at": "<Unix timestamp in seconds>",
20 "kind": 34550, 20 "kind": 34550,
21 "tags": [ 21 "tags": [
22 ["d", "<community_name>"], 22 ["d", "<Community_name>"],
23 ["description", "<community_description>"], 23 ["description", "<Community_description>"],
24 ["image", "<community_image>", "WidthxHeight"], 24 ["image", "<Community_image_url>", "<Width>x<Height>"],
25 25
26 //.. other tags relevant to defining the community 26 //.. other tags relevant to defining the community
27 27
28 // moderators 28 // moderators
29 ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>", "moderator"], 29 ["p", "<32-bytes hex of a pubkey1>", "<optional recommended relay URL>", "moderator"],
30 ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>", "moderator"], 30 ["p", "<32-bytes hex of a pubkey2>", "<optional recommended relay URL>", "moderator"],
31 ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>", "moderator"], 31 ["p", "<32-bytes hex of a pubkey3>", "<optional recommended relay URL>", "moderator"],
32 32
33 // relays used by the community 33 // relays used by the community
34 ["relay", "<relay hosting author kind 0>", "author"], 34 ["relay", "<relay hosting author kind 0>", "author"],
@@ -49,17 +49,17 @@ Any Nostr event can be a post request. Clients should simply add the community's
49 "created_at": "<Unix timestamp in seconds>", 49 "created_at": "<Unix timestamp in seconds>",
50 "kind": 1, 50 "kind": 1,
51 "tags": [ 51 "tags": [
52 ["a", "34550:<community event author pubkey>:<d-identifier of the community>", "<optional relay url>"], 52 ["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"],
53 ], 53 ],
54 "content": "<my content>" 54 "content": "<My content>"
55} 55}
56``` 56```
57 57
58Community management clients can filter all mentions of the kind-34550 event and request moderators to approve each submission. The same moderator can remove his/her approval of the post at any time. 58Community management clients can filter all mentions of the `kind:34550` event and request moderators to approve each submission. The same moderator can remove his/her approval of the post at any time.
59 59
60# Post Approval by moderators 60# Post Approval by moderators
61 61
62The post-approval event includes a stringified `new post request` event inside the `.content` of the approval (NIP-18-style). 62The post-approval event includes a stringified `new post request` event inside the `.content` of the approval ([NIP-18-style](18.md)).
63 63
64```js 64```js
65{ 65{
@@ -68,12 +68,12 @@ The post-approval event includes a stringified `new post request` event inside t
68 "created_at": "<Unix timestamp in seconds>", 68 "created_at": "<Unix timestamp in seconds>",
69 "kind": "4550", 69 "kind": "4550",
70 "tags": [ 70 "tags": [
71 ["a", "34550:<community event author pubkey>:<d-identifier of the community>", "<optional relay url>"], 71 ["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"],
72 ["e", "<Post Request ID>", "<optional relay url>"], 72 ["e", "<Post Request ID>", "<Optional relay url>"],
73 ["p", "<Post Request Author ID>", "<optional relay url>"], 73 ["p", "<Post Request Author ID>", "<Optional relay url>"],
74 ["k", "<New Post Request kind>"], 74 ["k", "<New Post Request kind>"],
75 ], 75 ],
76 "content": "{ <New Post Request JSON> }" 76 "content": "<New Post Request JSON>"
77} 77}
78``` 78```
79 79
@@ -87,8 +87,8 @@ The following filter displays the approved posts.
87 87
88```js 88```js
89{ 89{
90 "authors": ["<author>", "moderator1", "moderator2", "moderator3", ...], 90 "authors": ["<Author>", "<Moderator1>", "<Moderator2>", "<Moderator3>", ...],
91 "kinds": [4550], 91 "kinds": [4550],
92 "#a": ["34550:<community event author pubkey>:<d-identifier of the community>"], 92 "#a": ["34550:<Community event author pubkey>:<d-identifier of the community>"],
93} 93}
94``` \ No newline at end of file 94``` \ No newline at end of file