diff --git a/72.md b/72.md index 582410ad29..549b0879d1 100644 --- a/72.md +++ b/72.md @@ -6,7 +6,7 @@ Moderated Communities (Reddit Style) `draft` `optional` -The goal of this NIP is to enable public communities. It defines the replaceable event `kind:34550` to define the community and the current list of moderators/administrators. Users that want to post into the community, simply tag any Nostr event with the community's `a` tag. Moderators may issue an approval event `kind:4550`. +The goal of this NIP is to enable public communities. It defines the replaceable event kind `34550` to define the community and the current list of moderators. Users that want to post into the community, simply tag any Nostr event with the community's `a` tag. Moderators may issue approval events (kind `4550`) for individual posts, and may maintain a list of approved pubkeys with kind `14550`. # Community Definition @@ -60,9 +60,7 @@ Anyone may issue an approval event to express their opinion that a post is appro An approval event MUST include one or more community `a` tags, an `e` or `a` tag pointing to the post, and the `p` tag of the author of the post (for approval notifications). `a` tag prefixes can be used to disambiguate between community and replaceable event pointers (community `a` tags always begin with `34550`). -The event SHOULD also include the JSON-stringified `post request` event inside the `.content`, and a `k` tag with the original post's event kind to allow filtering of approved posts by kind. - -Moderators MAY request deletion of their approval of a post at any time using [NIP-09 event deletion requests](09.md). +The event MAY also include the JSON-stringified `post request` event inside the `.content`, and a `k` tag with the original post's event kind to allow filtering of approved posts by kind. ```jsonc { @@ -71,10 +69,117 @@ Moderators MAY request deletion of their approval of a post at any time using [N "tags": [ ["a", "34550::", ""], ["e", "", ""], - ["p", "", ""], + ["p", "", ""], ["k", ""] ], - "content": "", + "content": "", + // other fields... +} +``` + +Likewise, anyone can issue a removal event to express their opinion that a post is NOT appropriate for a community. Clients MAY choose removal events to honor, but SHOULD at least use ones published by the group's defined moderators. + +A removal event MUST include one or more community `a` tags, an `e` or `a` tag pointing to the post, and the `p` tag of the author of the post (for approval notifications). `a` tag prefixes can be used to disambiguate between community and replaceable event pointers (community `a` tags always begin with `34550`). + +The event MAY also include the JSON-stringified `post request` event inside the `.content`, and a `k` tag with the original post's event kind to allow filtering of approved posts by kind. + +```jsonc +{ + "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", + "kind": 4551, + "tags": [ + ["a", "34550::", ""], + ["e", "", ""], + ["p", "", ""], + ["k", ""] + ], + "content": "", + "reason": "" + // other fields... +} +``` + +Users MAY request to join a group at any time. When a user is an approved member, their posts should be displayed in the group whether if they are either "approved" or "unapproved", but NOT if the post is "removed." + +```jsonc +{ + "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", + "kind": 4552, + "tags": [ + ["a", "34550::", ""], + ], + "content": "", + // other fields... +} +``` + +Users MAY request to leave a group at any time. This does not require approval and should be always honored. + +```jsonc +{ + "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", + "kind": 4553, + "tags": [ + ["a", "34550::", ""], + ], + "content": "", + // other fields... +} +``` + + +Moderators MAY request deletion of their approval of a post at any time using [NIP-09 event deletion requests](09.md). + +Moderators may also maintain a list of approved pubkeys, so that any event by the pubkey is automatically considered approved. + +```jsonc +{ + "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", + "kind": 14550, + "tags": [ + ["a", "34550::", ""], + ["p", "", ""], + ["p", "", ""], + ["p", "", ""], + // other approved pubkeys... + ], + "content": "", + // other fields... +} +``` + +Moderators may also maintain a list of declined pubkeys: users who requested to join but were not approved. + +```jsonc +{ + "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", + "kind": 14551, + "tags": [ + ["a", "34550::", ""], + ["p", "", ""], + ["p", "", ""], + ["p", "", ""], + // other approved pubkeys... + ], + "content": "", + // other fields... +} +``` + +Moderators may also maintain a list of banned pubkeys: users who's posts or requests should not approved. + +```jsonc +{ + "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", + "kind": 14552, + "tags": [ + ["a", "34550::", ""], + ["p", "", ""], + ["p", "", ""], + ["p", "", ""], + // other approved pubkeys... + ], + "content": "", // other fields... } ```