From 892fe9e4004dbb515d71729b92d0432665f8e823 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Tue, 8 Aug 2023 13:31:54 -0300 Subject: [PATCH] move 172 to 72 and update indexes. --- 172.md => 72.md | 36 ++++++++++++++++++------------------ README.md | 6 +++++- 2 files changed, 23 insertions(+), 19 deletions(-) rename 172.md => 72.md (93%) diff --git a/172.md b/72.md similarity index 93% rename from 172.md rename to 72.md index 3535039..750b076 100644 --- a/172.md +++ b/72.md @@ -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": "", + "created_at": , "kind": 34550, "tags": [ ["d", ""], ["description", ""], ["image", "", "x"], - + //.. other tags relevant to defining the community // moderators ["p", "<32-bytes hex of a pubkey1>", "", "moderator"], ["p", "<32-bytes hex of a pubkey2>", "", "moderator"], ["p", "<32-bytes hex of a pubkey3>", "", "moderator"], - + // relays used by the community (w/optional marker) ["relay", "", "author"], - ["relay", "", "requests"], + ["relay", "", "requests"], ["relay", "", "approvals"], ["relay", ""] ] @@ -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": "", + "created_at": , "kind": 1, "tags": [ ["a", "34550::", ""], - ], + ], "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": "", - "kind": "4550", + "created_at": , + "kind": 4550, "tags": [ ["a", "34550::", ""], ["e", "", ""], ["p", "", ""], ["k", ""], - ], + ], "content": "" } ``` -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. \ No newline at end of file +Clients MAY hide approvals by blocked moderators at the user's request. diff --git a/README.md b/README.md index cfee37d..3c35ef3 100644 --- a/README.md +++ b/README.md @@ -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) |