move 172 to 72 and update indexes.

This commit is contained in:
fiatjaf 2023-08-08 13:31:54 -03:00
parent 507b0c20a5
commit 892fe9e400
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1
2 changed files with 23 additions and 19 deletions

View File

@ -1,5 +1,5 @@
NIP-172
=======
NIP-72
======
Moderated Communities (Reddit Style)
------------------------------------
@ -10,29 +10,29 @@ 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.
```js
```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,
"tags": [
["d", "<Community name>"],
["description", "<Community description>"],
["image", "<Community image url>", "<Width>x<Height>"],
//.. other tags relevant to defining the community
// moderators
["p", "<32-bytes hex of a pubkey1>", "<optional recommended relay URL>", "moderator"],
["p", "<32-bytes hex of a pubkey2>", "<optional recommended relay URL>", "moderator"],
["p", "<32-bytes hex of a pubkey3>", "<optional recommended relay URL>", "moderator"],
// relays used by the community (w/optional marker)
["relay", "<relay hosting author kind 0>", "author"],
["relay", "<relay where to send and receive requests>", "requests"],
["relay", "<relay where to send and receive requests>", "requests"],
["relay", "<relay where to send and receive approvals>", "approvals"],
["relay", "<relay where to post requests to and fetch approvals from>"]
]
@ -43,15 +43,15 @@ The goal of this NIP is to create moderator-approved public communities around a
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.
```js
```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": 1,
"tags": [
["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"],
],
],
"content": "<My content>"
}
```
@ -62,27 +62,27 @@ Community management clients MAY filter all mentions to a given `kind:34550` eve
The post-approval event MUST include `a` tags of the communities the moderator is posting into (one or more), the `e` tag of the post and `p` tag of the author of the post (for approval notificaitons). The event SHOULD also include the stringified `post request` event inside the `.content` ([NIP-18-style](18.md)) and a `k` tag with the original post's event kind to allow filtering of approved posts by kind.
```js
```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",
"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>"],
],
],
"content": "<New Post Request JSON>"
}
```
It's recommended that multiple moderators approve posts to avoid deleting them from the community when a moderator is removed from the owner's list. In case the full list of moderators must be rotated, the new moderator set must sign new approvals for posts in the past or the community will restart. The owner can also periodically copy and re-sign of each moderator's approval events to make sure posts don't dissapear with moderators.
It's recommended that multiple moderators approve posts to avoid deleting them from the community when a moderator is removed from the owner's list. In case the full list of moderators must be rotated, the new moderator set must sign new approvals for posts in the past or the community will restart. The owner can also periodically copy and re-sign of each moderator's approval events to make sure posts don't dissapear with moderators.
Post Approvals of replaceable events can be created in three ways: (i) by tagging the replaceable event as an `e` tag if moderators want to approve each individual change to the repleceable event; (ii) by tagging the replaceable event as an `a` tag if the moderator authorizes the replaceable event author to make changes without additional approvals and (iii) by tagging the replaceable event with both its `e` and `a` tag which empowers clients to display the original and updated versions of the event, with appropriate remarks in the UI. Since relays are instructed to delete old versions of a replaceable event, the `.content` of an `e`-approval MUST have the specific version of the event or Clients might not be able to find that version of the content anywhere.
Clients SHOULD evaluate any non-`34550:*` `a` tag as posts to be included in all `34550:*` `a` tags.
Clients SHOULD evaluate any non-`34550:*` `a` tag as posts to be included in all `34550:*` `a` tags.
# Displaying
@ -98,4 +98,4 @@ The following filter displays the approved posts.
}
```
Clients MAY hide approvals by blocked moderators at the user's request.
Clients MAY hide approvals by blocked moderators at the user's request.

View File

@ -65,6 +65,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
- [NIP-57: Lightning Zaps](57.md)
- [NIP-58: Badges](58.md)
- [NIP-65: Relay List Metadata](65.md)
- [NIP-72: Moderated Communities](72.md)
- [NIP-78: Application-specific data](78.md)
- [NIP-89: Recommended Application Handlers](89.md)
- [NIP-94: File Metadata](94.md)
@ -94,6 +95,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `1311` | Live Chat Message | [53](53.md) |
| `1984` | Reporting | [56](56.md) |
| `1985` | Label | [32](32.md) |
| `4550` | Community Post Approval | [72](72.md) |
| `9734` | Zap Request | [57](57.md) |
| `9735` | Zap | [57](57.md) |
| `10000` | Mute List | [51](51.md) |
@ -123,6 +125,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `31925` | Calendar Event RSVP | [52](52.md) |
| `31989` | Handler recommendation | [89](89.md) |
| `31990` | Handler information | [89](89.md) |
| `34550` | Community Definition | [72](72.md) |
### Event Kind Ranges
@ -170,7 +174,7 @@ When experimenting with kinds, keep in mind the classification introduced by [NI
| `e` | event id (hex) | relay URL, marker | [1](01.md), [10](10.md) |
| `g` | geohash | -- | [12](12.md), [52](52.md) |
| `i` | identity | proof | [39](39.md) |
| `k` | kind number (string) | -- | [18](18.md) |
| `k` | kind number (string) | -- | [18](18.md), [72](72.md) |
| `l` | label, label namespace | annotations | [32](32.md) |
| `L` | label namespace | -- | [32](32.md) |
| `p` | pubkey (hex) | relay URL | [1](01.md) |