-
Notifications
You must be signed in to change notification settings - Fork 0
NIP-72 improvements #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e206c71
353c6ac
3f3edcd
981ff17
d2c4120
0a78847
5554ad9
74e1cfb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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:<event-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"], | ||||||
| ["e", "<post-id>", "<optional-relay-url>"], | ||||||
| ["p", "<port-author-pubkey>", "<optional-relay-url>"], | ||||||
| ["p", "<post-author-pubkey>", "<optional-relay-url>"], | ||||||
| ["k", "<post-request-kind>"] | ||||||
| ], | ||||||
| "content": "<the full approved event, JSON-encoded>", | ||||||
| "content": "<the full approved event, JSON-encoded, (optional)>", | ||||||
| // 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`). | ||||||
|
|
||||||
|
Comment on lines
+82
to
+83
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct removal event tag description - 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 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 removal notifications).📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| 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:<event-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"], | ||||||
| ["e", "<post-id>", "<optional-relay-url>"], | ||||||
| ["p", "<post-author-pubkey>", "<optional-relay-url>"], | ||||||
| ["k", "<post-request-kind>"] | ||||||
| ], | ||||||
| "content": "<the full removal event, JSON-encoded, (optional)>", | ||||||
| "reason": "<the stated reason for removal, (optional)>" | ||||||
| // 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:<event-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"], | ||||||
| ], | ||||||
| "content": "<optional-join-reason>", | ||||||
| // 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:<event-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"], | ||||||
| ], | ||||||
| "content": "<optional-leave-reason>", | ||||||
| // 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:<event-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"], | ||||||
| ["p", "<approved-pubkey>", "<optional-relay-url>"], | ||||||
| ["p", "<approved-pubkey>", "<optional-relay-url>"], | ||||||
| ["p", "<approved-pubkey>", "<optional-relay-url>"], | ||||||
| // 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:<event-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"], | ||||||
| ["p", "<approved-pubkey>", "<optional-relay-url>"], | ||||||
| ["p", "<approved-pubkey>", "<optional-relay-url>"], | ||||||
| ["p", "<approved-pubkey>", "<optional-relay-url>"], | ||||||
| // 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:<event-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"], | ||||||
| ["p", "<approved-pubkey>", "<optional-relay-url>"], | ||||||
| ["p", "<approved-pubkey>", "<optional-relay-url>"], | ||||||
| ["p", "<approved-pubkey>", "<optional-relay-url>"], | ||||||
| // other approved pubkeys... | ||||||
| ], | ||||||
| "content": "", | ||||||
| // other fields... | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix duplicated filtering description for removal events
The copy-pasted line still refers to “approved posts,” which is misleading in the removal context. It should reference removal events instead.
Also applies to: 83-85
🤖 Prompt for AI Agents