Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 111 additions & 6 deletions 72.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
{
Expand All @@ -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.

Comment on lines +80 to +81
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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.

-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.
+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 removal events by kind.

Also applies to: 83-85

🤖 Prompt for AI Agents
In file 72.md around lines 80 to 85, the description for removal events
incorrectly references "approved posts," which is misleading. Update the text to
correctly refer to removal events instead of approved posts to accurately
reflect the context of filtering for removal events.

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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct removal event tag description
The parenthetical note still refers to “approval notifications” within a removal context. Update to accurately describe removal 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 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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
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`).
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). `a` tag prefixes can be used to disambiguate between community and replaceable event pointers (community `a` tags always begin with `34550`).
🤖 Prompt for AI Agents
In 72.md around lines 82 to 83, the parenthetical note incorrectly refers to
"approval notifications" in the context of removal events. Update the note to
accurately describe removal notifications by replacing "approval notifications"
with the correct term related to removal events, ensuring the description
matches the removal event context.

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...
}
```
Expand Down