upleb.uk

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

summaryrefslogtreecommitdiff
path: root/72.md
diff options
context:
space:
mode:
authorPablo Fernandez <p@f7z.io>2023-11-23 17:52:48 +0200
committerGitHub <noreply@github.com>2023-11-23 17:52:48 +0200
commit60256a62675a165c4d4fd9811a19a9cbf6a9e7fd (patch)
tree5c450154d373caafc37f324dd01e20338308c9d6 /72.md
parent43d50ee42409252a1313928cd437d55fd7bf7bf4 (diff)
parent7822a8b12670312aff104ddc03066425882f739d (diff)
Merge branch 'master' into nip88
Diffstat (limited to '72.md')
-rw-r--r--72.md50
1 files changed, 25 insertions, 25 deletions
diff --git a/72.md b/72.md
index 599a4c4..c0fffff 100644
--- a/72.md
+++ b/72.md
@@ -4,22 +4,20 @@ NIP-72
4Moderated Communities (Reddit Style) 4Moderated Communities (Reddit Style)
5------------------------------------ 5------------------------------------
6 6
7`draft` `optional` `author:vitorpamplona` `author:arthurfranca` 7`draft` `optional`
8 8
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. Moderators issue an approval event `kind: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. 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
13`Kind:34550` SHOULD include any field that helps define the community and the set of moderators. `relay` tags MAY be used to describe the preferred relay to download requests and approvals. 13`kind:34550` SHOULD include any field that helps define the community and the set of moderators. `relay` tags MAY be used to describe the preferred relay to download requests and approvals.
14 14
15```json 15```json
16{ 16{
17 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
18 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
19 "created_at": <Unix timestamp in seconds>, 17 "created_at": <Unix timestamp in seconds>,
20 "kind": 34550, 18 "kind": 34550,
21 "tags": [ 19 "tags": [
22 ["d", "<Community name>"], 20 ["d", "<community-d-identifier>"],
23 ["description", "<Community description>"], 21 ["description", "<Community description>"],
24 ["image", "<Community image url>", "<Width>x<Height>"], 22 ["image", "<Community image url>", "<Width>x<Height>"],
25 23
@@ -35,24 +33,23 @@ The goal of this NIP is to create moderator-approved public communities around a
35 ["relay", "<relay where to send and receive requests>", "requests"], 33 ["relay", "<relay where to send and receive requests>", "requests"],
36 ["relay", "<relay where to send and receive approvals>", "approvals"], 34 ["relay", "<relay where to send and receive approvals>", "approvals"],
37 ["relay", "<relay where to post requests to and fetch approvals from>"] 35 ["relay", "<relay where to post requests to and fetch approvals from>"]
38 ] 36 ],
37 ...
39} 38}
40``` 39```
41 40
42# New Post Request 41# New Post Request
43 42
44Any Nostr event can be a post request. Clients MUST add the community's `a` tag to the new post event in order to be presented for the moderator's approval. 43Any Nostr event can be submitted to a community by anyone for approval. Clients MUST add the community's `a` tag to the new post event in order to be presented for the moderator's approval.
45 44
46```json 45```json
47{ 46{
48 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
49 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
50 "created_at": <Unix timestamp in seconds>,
51 "kind": 1, 47 "kind": 1,
52 "tags": [ 48 "tags": [
53 ["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"], 49 ["a", "34550:<community event author pubkey>:<community-d-identifier>", "<optional-relay-url>"],
54 ], 50 ],
55 "content": "<My content>" 51 "content": "hello world",
52 ...
56} 53}
57``` 54```
58 55
@@ -64,17 +61,16 @@ The post-approval event MUST include `a` tags of the communities the moderator i
64 61
65```json 62```json
66{ 63{
67 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
68 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", 64 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
69 "created_at": <Unix timestamp in seconds>,
70 "kind": 4550, 65 "kind": 4550,
71 "tags": [ 66 "tags": [
72 ["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"], 67 ["a", "34550:<event-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"],
73 ["e", "<Post Request ID>", "<Optional relay url>"], 68 ["e", "<post-id>", "<optional-relay-url>"],
74 ["p", "<Post Request Author ID>", "<Optional relay url>"], 69 ["p", "<port-author-pubkey>", "<optional-relay-url>"],
75 ["k", "<New Post Request kind>"], 70 ["k", "<post-request-kind>"]
76 ], 71 ],
77 "content": "<New Post Request JSON>" 72 "content": "<the full approved event, JSON-encoded>",
73 ...
78} 74}
79``` 75```
80 76
@@ -90,12 +86,16 @@ Community clients SHOULD display posts that have been approved by at least 1 mod
90 86
91The following filter displays the approved posts. 87The following filter displays the approved posts.
92 88
93```js 89```json
94{ 90[
95 "authors": ["<Author pubkey>", "<Moderator1 pubkey>", "<Moderator2 pubkey>", "<Moderator3 pubkey>", ...], 91 "REQ",
96 "kinds": [4550], 92 "_",
97 "#a": ["34550:<Community event author pubkey>:<d-identifier of the community>"], 93 {
98} 94 "authors": ["<owner-pubkey>", "<moderator1-pubkey>", "<moderator2-pubkey>", "<moderator3-pubkey>", ...],
95 "kinds": [4550],
96 "#a": ["34550:<Community event author pubkey>:<d-identifier of the community>"],
97 }
98]
99``` 99```
100 100
101Clients MAY hide approvals by blocked moderators at the user's request. 101Clients MAY hide approvals by blocked moderators at the user's request.