{"id":"93f88744b3a64617c3fbbe7f9f593b3f43541be9b0b6c8e364d9b201900165bc","pubkey":"cfd7df62799a22e384a4ab5da8c4026c875b119d0f47c2716b20cdac9cc1f1a6","created_at":1754223408,"kind":30817,"tags":[["d","nostr-groups-chorus"],["title","Nostr Groups (+Chorus)"],["k","34550"],["k","34551"],["k","34552"],["k","34553"],["k","34554"],["k","34555"],["k","4550"],["k","4551"],["k","4552"],["k","4553"],["k","4554"],["client","nostrhub.io"]],"content":"# Chorus NIP-72 Extensions\n\n`draft` `optional`\n\n**⚠️ DISCLAIMER: This NIP is still under active development and subject to change. The event kinds and specifications described here are experimental and may be modified, deprecated, or replaced in future versions. It is not recommended to implement this NIP in production systems without first discussing it with the Chorus development team.**\n\nThis document describes the Chorus platform's extensions to NIP-72 (Moderated Communities) that enhance community management, user moderation, and content organization capabilities. Chorus implements NIP-22 (Comment) for all group discussions, treating the community itself as the root event for threaded conversations.\n\n## Background\n\nNIP-72 defines the basic framework for moderated communities on Nostr using:\n- **Kind 34550**: Community definition events\n- **Kind 4550**: Post approval events\n\nNIP-22 defines a comment threading system using:\n- **Kind 1111**: Comments scoped to a root event\n\nChorus combines these specifications, using NIP-22 comments scoped to NIP-72 communities for all group discussions, and extends this foundation with additional event kinds to provide comprehensive community management features including member lists, content pinning, join requests, and enhanced moderation workflows.\n\n## Core NIP-72 Event Kinds\n\n### Kind 34550: Community Definition\nDefines a community with metadata and moderator lists as specified in NIP-72.\n\n### Kind 4550: Post Approval  \nModerator approval events for comments as specified in NIP-72, extended to handle Kind 1111 comments.\n\n**Tags:**\n- `[\"a\", communityId]` - References the target community\n- `[\"e\", commentId]` - References the approved comment\n- `[\"p\", commentAuthorPubkey]` - References the comment author\n- `[\"k\", \"1111\"]` - Kind of the approved comment\n\n**Content:**\nContains the full JSON of the approved comment event for redistribution.\n\n## Chorus Extensions\n\n### Member Management Events\n\n#### Kind 34551: Approved Members List\n**Addressable event** that maintains a list of users who are pre-approved to post in the community without requiring individual post approvals.\n\n**Tags:**\n- `[\"d\", communityId]` - Identifies which community this list belongs to\n- `[\"p\", pubkey]` - One tag per approved member\n\n**Example:**\n```json\n{\n  \"kind\": 34551,\n  \"pubkey\": \"moderator_pubkey\",\n  \"created_at\": 1234567890,\n  \"tags\": [\n    [\"d\", \"34550:community_creator_pubkey:bitcoin-discussion\"],\n    [\"p\", \"approved_user_1_pubkey\"],\n    [\"p\", \"approved_user_2_pubkey\"],\n    [\"p\", \"approved_user_3_pubkey\"]\n  ],\n  \"content\": \"\"\n}\n```\n\n#### Kind 34552: Declined Members List\n**Addressable event** that tracks users whose join requests have been declined.\n\n**Tags:**\n- `[\"d\", communityId]` - Identifies which community this list belongs to  \n- `[\"p\", pubkey]` - One tag per declined user\n\n**Example:**\n```json\n{\n  \"kind\": 34552,\n  \"pubkey\": \"moderator_pubkey\",\n  \"created_at\": 1234567890,\n  \"tags\": [\n    [\"d\", \"34550:community_creator_pubkey:bitcoin-discussion\"],\n    [\"p\", \"declined_user_1_pubkey\"],\n    [\"p\", \"declined_user_2_pubkey\"]\n  ],\n  \"content\": \"\"\n}\n```\n\n#### Kind 34553: Banned Members List\n**Addressable event** that maintains a list of users who are banned from the community.\n\n**Tags:**\n- `[\"d\", communityId]` - Identifies which community this list belongs to\n- `[\"p\", pubkey]` - One tag per banned user\n\n**Example:**\n```json\n{\n  \"kind\": 34553,\n  \"pubkey\": \"moderator_pubkey\", \n  \"created_at\": 1234567890,\n  \"tags\": [\n    [\"d\", \"34550:community_creator_pubkey:bitcoin-discussion\"],\n    [\"p\", \"banned_user_1_pubkey\"],\n    [\"p\", \"banned_user_2_pubkey\"]\n  ],\n  \"content\": \"\"\n}\n```\n\n### Content Organization Events\n\n#### Kind 34554: Pinned Posts List\n**Addressable event** that maintains a list of posts pinned by community moderators.\n\n**Tags:**\n- `[\"d\", communityId]` - Identifies which community this list belongs to\n- `[\"e\", eventId]` - One tag per pinned post\n\n**Example:**\n```json\n{\n  \"kind\": 34554,\n  \"pubkey\": \"moderator_pubkey\",\n  \"created_at\": 1234567890,\n  \"tags\": [\n    [\"d\", \"34550:community_creator_pubkey:bitcoin-discussion\"],\n    [\"e\", \"pinned_post_1_id\"],\n    [\"e\", \"pinned_post_2_id\"],\n    [\"e\", \"pinned_post_3_id\"]\n  ],\n  \"content\": \"\"\n}\n```\n\n#### Kind 34555: Pinned Groups List\n**Addressable event** that allows users to maintain a personal list of their favorite/pinned communities.\n\n**Tags:**\n- `[\"d\", \"pinned-groups\"]` - Identifies this as the user's pinned groups list\n- `[\"a\", communityId]` - One tag per pinned community\n\n**Example:**\n```json\n{\n  \"kind\": 34555,\n  \"pubkey\": \"user_pubkey\",\n  \"created_at\": 1234567890,\n  \"tags\": [\n    [\"d\", \"pinned-groups\"],\n    [\"a\", \"34550:creator1_pubkey:bitcoin-discussion\"],\n    [\"a\", \"34550:creator2_pubkey:nostr-development\"],\n    [\"a\", \"34550:creator3_pubkey:photography\"]\n  ],\n  \"content\": \"\"\n}\n```\n\n### Moderation Action Events\n\n#### Kind 4551: Post Removal\n**Regular event** that indicates a moderator has removed a post from the community.\n\n**Tags:**\n- `[\"a\", communityId]` - References the target community\n- `[\"e\", eventId]` - References the removed comment\n- `[\"p\", authorPubkey]` - References the comment author\n- `[\"k\", \"1111\"]` - Kind of the original comment\n\n**Content:**\nThe content field can be left blank or optionally include a moderation reason.\n\n**Example:**\n```json\n{\n  \"kind\": 4551,\n  \"pubkey\": \"moderator_pubkey\",\n  \"created_at\": 1234567890,\n  \"tags\": [\n    [\"a\", \"34550:community_creator_pubkey:bitcoin-discussion\"],\n    [\"e\", \"removed_post_id\"],\n    [\"p\", \"post_author_pubkey\"],\n    [\"k\", \"1111\"]\n  ],\n  \"content\": \"Removed for violating community guidelines\"\n}\n```\n\n#### Kind 4552: Join Request\n**Regular event** that represents a user's request to join a community.\n\n**Tags:**\n- `[\"a\", communityId]` - References the target community\n\n**Example:**\n```json\n{\n  \"kind\": 4552,\n  \"pubkey\": \"requesting_user_pubkey\",\n  \"created_at\": 1234567890,\n  \"tags\": [\n    [\"a\", \"34550:community_creator_pubkey:bitcoin-discussion\"]\n  ],\n  \"content\": \"I would like to join this community to discuss Bitcoin topics.\"\n}\n```\n\n#### Kind 4553: Leave Request  \n**Regular event** that represents a user's request to leave a community.\n\n**Tags:**\n- `[\"a\", communityId]` - References the target community\n\n**Example:**\n```json\n{\n  \"kind\": 4553,\n  \"pubkey\": \"leaving_user_pubkey\",\n  \"created_at\": 1234567890,\n  \"tags\": [\n    [\"a\", \"34550:community_creator_pubkey:bitcoin-discussion\"]\n  ],\n  \"content\": \"I am leaving this community.\"\n}\n```\n\n#### Kind 4554: Close Report\n**Regular event** that indicates a moderator has resolved a report (Kind 1984).\n\n**Tags:**\n- `[\"e\", reportId]` - References the original report event\n- `[\"a\", communityId]` - References the target community  \n- `[\"t\", actionType]` - Indicates the action taken (e.g., \"content removed\", \"user banned\", \"closed without action\")\n\n**Example:**\n```json\n{\n  \"kind\": 4554,\n  \"pubkey\": \"moderator_pubkey\",\n  \"created_at\": 1234567890,\n  \"tags\": [\n    [\"e\", \"original_report_id\"],\n    [\"a\", \"34550:community_creator_pubkey:bitcoin-discussion\"],\n    [\"t\", \"content removed\"]\n  ],\n  \"content\": \"Report resolved: Content violated community guidelines and has been removed.\"\n}\n```\n\n### Group Discussion Events (NIP-22 Implementation)\n\nAll group discussions in Chorus use **Kind 1111** (NIP-22 Comments) scoped to the community as the root event. This provides proper threading while maintaining compatibility with the broader Nostr ecosystem.\n\n#### Kind 1111: Group Comment (Top-Level Post)\nA top-level post in a community, implemented as a NIP-22 comment scoped to the community.\n\n**Tags (NIP-22 compliant):**\n- `[\"A\", communityId]` - Root scope: the community (uppercase)\n- `[\"K\", \"34550\"]` - Root kind: community (uppercase)\n- `[\"P\", communityCreatorPubkey]` - Root author: community creator (uppercase)\n- `[\"a\", communityId]` - Parent scope: same as root for top-level posts (lowercase)\n- `[\"k\", \"34550\"]` - Parent kind: community (lowercase)\n- `[\"p\", communityCreatorPubkey]` - Parent author: community creator (lowercase)\n\n**Example:**\n```json\n{\n  \"kind\": 1111,\n  \"pubkey\": \"user_pubkey\",\n  \"created_at\": 1234567890,\n  \"tags\": [\n    [\"A\", \"34550:community_creator_pubkey:bitcoin-discussion\"],\n    [\"K\", \"34550\"],\n    [\"P\", \"community_creator_pubkey\"],\n    [\"a\", \"34550:community_creator_pubkey:bitcoin-discussion\"],\n    [\"k\", \"34550\"],\n    [\"p\", \"community_creator_pubkey\"]\n  ],\n  \"content\": \"What do you think about the latest Bitcoin price movement?\"\n}\n```\n\n#### Kind 1111: Group Comment (Reply)\nA reply to another comment in a community, following NIP-22 threading rules.\n\n**Tags (NIP-22 compliant):**\n- `[\"A\", communityId]` - Root scope: the community (uppercase)\n- `[\"K\", \"34550\"]` - Root kind: community (uppercase)  \n- `[\"P\", communityCreatorPubkey]` - Root author: community creator (uppercase)\n- `[\"e\", parentCommentId]` - Parent event: the comment being replied to (lowercase)\n- `[\"k\", \"1111\"]` - Parent kind: comment (lowercase)\n- `[\"p\", parentCommentAuthorPubkey]` - Parent author: comment author (lowercase)\n\n**Example:**\n```json\n{\n  \"kind\": 1111,\n  \"pubkey\": \"replying_user_pubkey\",\n  \"created_at\": 1234567890,\n  \"tags\": [\n    [\"A\", \"34550:community_creator_pubkey:bitcoin-discussion\"],\n    [\"K\", \"34550\"],\n    [\"P\", \"community_creator_pubkey\"],\n    [\"e\", \"parent_comment_id\"],\n    [\"k\", \"1111\"],\n    [\"p\", \"parent_comment_author_pubkey\"]\n  ],\n  \"content\": \"I think the price movement is due to institutional adoption increasing.\"\n}\n```\n\n## Implementation Notes\n\n### Addressable vs Regular Events\n\n**Addressable Events (3455x kinds)** use `[\"d\", identifier]` tags for self-identification:\n- Kind 34550: Community definitions\n- Kind 34551: Approved members lists  \n- Kind 34552: Declined members lists\n- Kind 34553: Banned members lists\n- Kind 34554: Pinned posts lists\n- Kind 34555: Pinned groups lists\n\n**Regular Events (455x kinds)** use `[\"a\", communityId]` tags to reference communities:\n- Kind 4550: Post approvals\n- Kind 4551: Post removals\n- Kind 4552: Join requests\n- Kind 4553: Leave requests  \n- Kind 4554: Close reports\n\n### Auto-Approval Workflow\n\nComments from users in the approved members list (Kind 34551) are automatically considered approved without requiring individual Kind 4550 approval events. This reduces moderation overhead for trusted community members.\n\n### NIP-22 Threading Implementation\n\nChorus implements NIP-22 threading with the community (Kind 34550) as the root event:\n\n1. **Top-level comments**: Both uppercase (root) and lowercase (parent) tags point to the community\n2. **Nested replies**: Uppercase tags point to the community (root), lowercase tags point to the parent comment\n3. **Querying top-level posts**: Filter Kind 1111 events where parent kind (`k` tag) is \"34550\"\n4. **Querying replies**: Filter Kind 1111 events where parent kind (`k` tag) is \"1111\"\n\nThis approach ensures proper threading while maintaining the community as the central organizing principle.\n\n### Query Patterns\n\n**Top-level posts in a community:**\n```json\n{\n  \"kinds\": [1111],\n  \"#A\": [\"34550:creator_pubkey:community_identifier\"],\n  \"limit\": 50\n}\n```\nThen filter results where the `k` tag value is \"34550\".\n\n**Replies to a specific comment:**\n```json\n{\n  \"kinds\": [1111],\n  \"#e\": [\"parent_comment_id\"],\n  \"limit\": 100\n}\n```\n\n**All comments in a community (posts + replies):**\n```json\n{\n  \"kinds\": [1111],\n  \"#A\": [\"34550:creator_pubkey:community_identifier\"],\n  \"limit\": 100\n}\n```\n\n**Approvals for comments in a community:**\n```json\n{\n  \"kinds\": [4550],\n  \"#a\": [\"34550:creator_pubkey:community_identifier\"],\n  \"#k\": [\"1111\"],\n  \"limit\": 50\n}\n```\n\n### Moderation Hierarchy\n\n1. **Community Creator**: Has full control over the community\n2. **Moderators**: Listed in the community definition with `[\"p\", pubkey, relay, \"moderator\"]` tags\n3. **Approved Members**: Can post comments without individual approval\n4. **Regular Members**: Comments require moderator approval\n5. **Banned Users**: Cannot post, all content hidden\n\n### Client Implementation\n\nClients SHOULD:\n- Display approved comments by default\n- Provide toggles to view pending/unapproved content for moderators\n- Hide content from banned users\n- Show visual indicators for pinned posts\n- Implement join request workflows for private communities\n- Support NIP-22 threaded replies within communities\n- Properly distinguish between top-level comments (parent kind \"34550\") and nested replies (parent kind \"1111\")\n- Query using appropriate tag filters (`#A` for root scope, `#e` for parent events)\n\n## Security Considerations\n\n- Member lists should only be updated by community moderators\n- Clients should verify moderator permissions before displaying moderation actions\n- Banned user lists should be respected across all community interactions\n- Report resolution events should only be created by authorized moderators\n\n## Compatibility\n\nThese extensions are designed to be compatible with both NIP-72 and NIP-22. Clients that implement:\n\n- **Basic NIP-72 only**: Will see community definitions and approvals but not threaded discussions\n- **NIP-22 only**: Will see threaded comments but may not understand community context\n- **Both NIP-72 and NIP-22**: Will have full functionality including threaded community discussions\n- **Chorus extensions**: Will have access to enhanced moderation and organization features\n\nThe use of NIP-22 for group discussions ensures broader interoperability with other Nostr clients that support comment threading.","sig":"86dd54b9166be90c587a1504ea1a064168006ff1d3f53d9060af49639d00da9f6688250191800069106ab9ac7f17bbcf86ec3de71dc0ff74e06bf2f893c22a72"}