Skip to content

Commit

Permalink
NIP-72: reformat and clarify some things.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Nov 18, 2023
1 parent 7aa751b commit b0df718
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions 72.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ The goal of this NIP is to create moderator-approved public communities around a

# Community Definition

`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.
`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.

```json
{
"id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
"pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
...
"created_at": <Unix timestamp in seconds>,
"kind": 34550,
"tags": [
["d", "<Community name>"],
["d", "<community-d-identifier>"],
["description", "<Community description>"],
["image", "<Community image url>", "<Width>x<Height>"],

Expand All @@ -41,18 +40,16 @@ The goal of this NIP is to create moderator-approved public communities around a

# New Post Request

Any 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.
Any 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.

```json
{
"id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
"pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
"created_at": <Unix timestamp in seconds>,
...
"kind": 1,
"tags": [
["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"],
["a", "34550:<community event author pubkey>:<community-d-identifier>", "<optional-relay-url>"],
],
"content": "<My content>"
"content": "hello world"
}
```

Expand All @@ -64,17 +61,16 @@ The post-approval event MUST include `a` tags of the communities the moderator i

```json
{
"id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
...
"pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
"created_at": <Unix timestamp in seconds>,
"kind": 4550,
"tags": [
["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"],
["e", "<Post Request ID>", "<Optional relay url>"],
["p", "<Post Request Author ID>", "<Optional relay url>"],
["k", "<New Post Request kind>"],
["a", "34550:<event-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"],
["e", "<post-id>", "<optional-relay-url>"],
["p", "<port-author-pubkey>", "<optional-relay-url>"],
["k", "<post-request-kind>"]
],
"content": "<New Post Request JSON>"
"content": "<the full approved event, JSON-encoded>"
}
```

Expand All @@ -91,11 +87,15 @@ Community clients SHOULD display posts that have been approved by at least 1 mod
The following filter displays the approved posts.

```js
{
"authors": ["<Author pubkey>", "<Moderator1 pubkey>", "<Moderator2 pubkey>", "<Moderator3 pubkey>", ...],
"kinds": [4550],
"#a": ["34550:<Community event author pubkey>:<d-identifier of the community>"],
}
[
"REQ",
"_",
{
"authors": ["<owner-pubkey>", "<moderator1-pubkey>", "<moderator2-pubkey>", "<moderator3-pubkey>", ...],
"kinds": [4550],
"#a": ["34550:<Community event author pubkey>:<d-identifier of the community>"],
}
]
```

Clients MAY hide approvals by blocked moderators at the user's request.

0 comments on commit b0df718

Please sign in to comment.