From e206c7102011331a1ee233c51f181d770c28af5e Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 20 May 2025 03:42:52 -0500 Subject: [PATCH 1/8] NIP-72: fix typo --- 72.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/72.md b/72.md index 582410ad29..1d41986c15 100644 --- a/72.md +++ b/72.md @@ -71,7 +71,7 @@ Moderators MAY request deletion of their approval of a post at any time using [N "tags": [ ["a", "34550::", ""], ["e", "", ""], - ["p", "", ""], + ["p", "", ""], ["k", ""] ], "content": "", From 353c6ac991792c24d5b7bfd35dbeecd91c79baf6 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 20 May 2025 03:45:01 -0500 Subject: [PATCH 2/8] NIP-72: add kind 14550 --- 72.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/72.md b/72.md index 1d41986c15..7249a06bca 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 From 3f3edcde5bb91099b16e29094512ef8a211eeffb Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 20 May 2025 03:47:06 -0500 Subject: [PATCH 3/8] NIP-72: including the JSON event is optional --- 72.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/72.md b/72.md index 7249a06bca..9870942d73 100644 --- a/72.md +++ b/72.md @@ -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 { @@ -74,11 +72,13 @@ Moderators MAY request deletion of their approval of a post at any time using [N ["p", "", ""], ["k", ""] ], - "content": "", + "content": "", // other fields... } ``` +Moderators MAY request deletion of their approval of a post at any time using [NIP-09 event deletion requests](09.md). + 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 disappear with moderators. Approvals of replaceable events can be created in three ways: From 981ff17c389a513ca0733f188f40d61b38aff815 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 20 May 2025 03:49:05 -0500 Subject: [PATCH 4/8] NIP-72: add kind 14550 example --- 72.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/72.md b/72.md index 9870942d73..819e40f76a 100644 --- a/72.md +++ b/72.md @@ -79,6 +79,24 @@ The event MAY also include the JSON-stringified `post request` event inside the 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... +} +``` + 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 disappear with moderators. Approvals of replaceable events can be created in three ways: From d2c4120972e8737076698d337e244a0711dfce0e Mon Sep 17 00:00:00 2001 From: Mary Kate Fain Date: Tue, 20 May 2025 12:02:07 +0200 Subject: [PATCH 5/8] add removal request kind and request to join kind --- 72.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/72.md b/72.md index 819e40f76a..ce8f5063d4 100644 --- a/72.md +++ b/72.md @@ -77,6 +77,43 @@ The event MAY also include the JSON-stringified `post request` event inside the } ``` +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": 14551, + "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. From 0a7884721dcbfbd3eab4f5bc628ecefb6727b2ff Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 20 May 2025 12:22:47 +0200 Subject: [PATCH 6/8] 14551 -> 4552 --- 72.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/72.md b/72.md index ce8f5063d4..ba13c9acaf 100644 --- a/72.md +++ b/72.md @@ -104,7 +104,7 @@ Users MAY request to join a group at any time. When a user is an approved member ```jsonc { "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", - "kind": 14551, + "kind": 4552, "tags": [ ["a", "34550::", ""], ], From 5554ad95c744c98d430f0ad7a15b636d78677471 Mon Sep 17 00:00:00 2001 From: Mary Kate Fain Date: Tue, 20 May 2025 13:09:18 +0200 Subject: [PATCH 7/8] add removing users from groups and declining requests to join --- 72.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/72.md b/72.md index ba13c9acaf..37f5609993 100644 --- a/72.md +++ b/72.md @@ -113,6 +113,20 @@ Users MAY request to join a group at any time. When a user is an approved member } ``` +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). @@ -134,6 +148,24 @@ Moderators may also maintain a list of approved pubkeys, so that any event by th } ``` +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... +} +``` + 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 disappear with moderators. Approvals of replaceable events can be created in three ways: From 74e1cfbc25b385e4f8783e5422ba03294e27703f Mon Sep 17 00:00:00 2001 From: Mary Kate Fain Date: Tue, 20 May 2025 16:59:10 +0200 Subject: [PATCH 8/8] banned user lists --- 72.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/72.md b/72.md index 37f5609993..549b0879d1 100644 --- a/72.md +++ b/72.md @@ -166,6 +166,24 @@ Moderators may also maintain a list of declined pubkeys: users who requested to } ``` +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... +} +``` + 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 disappear with moderators. Approvals of replaceable events can be created in three ways: