From 1912dacd33e69584e7f451e18a81bdc114ea9d76 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 12 Jun 2023 18:35:23 -0400 Subject: [PATCH] Simple moderated communities flow. --- 172.md | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 172.md diff --git a/172.md b/172.md new file mode 100644 index 0000000..0cc8107 --- /dev/null +++ b/172.md @@ -0,0 +1,85 @@ +NIP-172 +======= + +Moderated Communities (Reddit Style) +------------------------------------ + +`draft` `optional` `author:vitorpamplona` + +The goal of this NIP is to create moderator-approved public communities arount a topic. It defines the replaceable event `34550` to define the community and the current list of moderators/administrators. Users that want to post into to the community, simply tag any Nostr event with an `a` tag. Moderators the issue an approval event `34551` that links the community with the new post. + +# Community definition + +Kind 34550 should include any field that helps define the community and the set of moderators. + +```js +{ + "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": "34550", + "tags": [ + ["d", ""], + ["description", ""], + + // moderators + ["p", "<32-bytes hex of a pubkey>", "", "moderator"] + ["p", "<32-bytes hex of a pubkey>", "", "moderator"] + ["p", "<32-bytes hex of a pubkey>", "", "moderator"] + ] +} +``` + +# New Post Request + +Any Nostr event can be a post request. Clients should simply add the community's `a` tag to be presented for the moderator's approval. + +```js +{ + "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": "1", + "tags": [ + ["a", "34550::", ""], + ], + "content": "" +} +``` + +Community management clients can filter all mentions to the kind-34550 event and request moderators to approve each submission. The same moderator can remove his/her approval of the post at anytime. + +# Post Approval by moderators + +The post approval includes a stringified `new post request` event inside the content's of the approval (NIP-18-style). + +```js +{ + "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": "34551", + "tags": [ + ["a", "34550::", ""], + ["e", "", ""], + ["p", "", ""], + ], + "content": "{ }" +} +``` + +It's recommended that multiple moderators approve posts to avoid unapproving them when a given moderator is removed from the owner's list. In case the full list of moderators must be rotated, the new moderator set must sign post approvals for the past post or the community will restart. + +# Displaying + +Community clients can display posts that have been approved by at least 1 moderator or by the community owner. + +The following filter displays the approved posts. + +```js +{ + "authors": ["", "moderator1", "moderator2", "moderator3", ...], + "kinds": 34551, + "#a": ["34550::"], +} +``` \ No newline at end of file