mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-13 19:06:24 +00:00
NIP-72: reformat and clarify some things.
This commit is contained in:
parent
7aa751be46
commit
b0df71824f
44
72.md
44
72.md
@ -10,16 +10,15 @@ The goal of this NIP is to create moderator-approved public communities around a
|
|||||||
|
|
||||||
# Community Definition
|
# 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
|
```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>,
|
"created_at": <Unix timestamp in seconds>,
|
||||||
"kind": 34550,
|
"kind": 34550,
|
||||||
"tags": [
|
"tags": [
|
||||||
["d", "<Community name>"],
|
["d", "<community-d-identifier>"],
|
||||||
["description", "<Community description>"],
|
["description", "<Community description>"],
|
||||||
["image", "<Community image url>", "<Width>x<Height>"],
|
["image", "<Community image url>", "<Width>x<Height>"],
|
||||||
|
|
||||||
@ -41,18 +40,16 @@ The goal of this NIP is to create moderator-approved public communities around a
|
|||||||
|
|
||||||
# New Post Request
|
# 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
|
```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,
|
"kind": 1,
|
||||||
"tags": [
|
"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"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -64,17 +61,16 @@ The post-approval event MUST include `a` tags of the communities the moderator i
|
|||||||
|
|
||||||
```json
|
```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>",
|
"pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
|
||||||
"created_at": <Unix timestamp in seconds>,
|
|
||||||
"kind": 4550,
|
"kind": 4550,
|
||||||
"tags": [
|
"tags": [
|
||||||
["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"],
|
["a", "34550:<event-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"],
|
||||||
["e", "<Post Request ID>", "<Optional relay url>"],
|
["e", "<post-id>", "<optional-relay-url>"],
|
||||||
["p", "<Post Request Author ID>", "<Optional relay url>"],
|
["p", "<port-author-pubkey>", "<optional-relay-url>"],
|
||||||
["k", "<New Post Request kind>"],
|
["k", "<post-request-kind>"]
|
||||||
],
|
],
|
||||||
"content": "<New Post Request JSON>"
|
"content": "<the full approved event, JSON-encoded>"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -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.
|
The following filter displays the approved posts.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
{
|
[
|
||||||
"authors": ["<Author pubkey>", "<Moderator1 pubkey>", "<Moderator2 pubkey>", "<Moderator3 pubkey>", ...],
|
"REQ",
|
||||||
"kinds": [4550],
|
"_",
|
||||||
"#a": ["34550:<Community event author pubkey>:<d-identifier of the community>"],
|
{
|
||||||
}
|
"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.
|
Clients MAY hide approvals by blocked moderators at the user's request.
|
||||||
|
Loading…
Reference in New Issue
Block a user