diff options
| author | Alex Gleason <alex@alexgleason.me> | 2026-04-10 13:31:37 -0500 |
|---|---|---|
| committer | Alex Gleason <alex@alexgleason.me> | 2026-04-10 13:31:37 -0500 |
| commit | 5e1e24766910fc07cb61a049aed2623987458ec2 (patch) | |
| tree | b7588f61fddf9374268d5cd6f4e3f2655d7c840a /72.md | |
| parent | b8782df594b4e7e8f088869134908eed58be6078 (diff) | |
| parent | 3465f540e3eaedccb5309711b502f0febf56b52f (diff) | |
Merge nip44-big-payloads into bigger-nip44bigger-nip44
Diffstat (limited to '72.md')
| -rw-r--r-- | 72.md | 52 |
1 files changed, 44 insertions, 8 deletions
| @@ -8,7 +8,7 @@ Moderated Communities (Reddit Style) | |||
| 8 | 8 | ||
| 9 | 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`. | 9 | 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`. |
| 10 | 10 | ||
| 11 | # Community Definition | 11 | ## Community Definition |
| 12 | 12 | ||
| 13 | `Kind:34550` SHOULD include any field that helps define the community and the set of moderators. `relay` tags MAY be used to describe the preferred relay to download requests and approvals. A community definition event's `d` tag MAY double as its name, but if a `name` tag is provided, it SHOULD be displayed instead of the `d` tag. | 13 | `Kind:34550` SHOULD include any field that helps define the community and the set of moderators. `relay` tags MAY be used to describe the preferred relay to download requests and approvals. A community definition event's `d` tag MAY double as its name, but if a `name` tag is provided, it SHOULD be displayed instead of the `d` tag. |
| 14 | 14 | ||
| @@ -39,22 +39,58 @@ The goal of this NIP is to enable public communities. It defines the replaceable | |||
| 39 | } | 39 | } |
| 40 | ``` | 40 | ``` |
| 41 | 41 | ||
| 42 | # Posting to a community | 42 | ## Posting to a community |
| 43 | 43 | ||
| 44 | Any Nostr event can be posted to a community. Clients MUST add one or more community `a` tags, each with a recommended relay. | 44 | [NIP-22](22.md) kind 1111 events SHOULD be used for text notes posted to a community, with the `A` tag always scoped to the community definition. |
| 45 | |||
| 46 | ### Top-level posts | ||
| 47 | |||
| 48 | For top-level posts, the uppercase and lowercase NIP-22 tags should both refer to the community definition itself. | ||
| 49 | |||
| 50 | ```jsonc | ||
| 51 | { | ||
| 52 | "kind": 1111, | ||
| 53 | "tags": [ | ||
| 54 | ["A", "34550:<community-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"], | ||
| 55 | ["a", "34550:<community-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"], | ||
| 56 | ["P", "<community-author-pubkey>", "<optional-relay-url>"], | ||
| 57 | ["p", "<community-author-pubkey>", "<optional-relay-url>"], | ||
| 58 | ["K", "34550"], | ||
| 59 | ["k", "34550"], | ||
| 60 | ], | ||
| 61 | "content": "Hi everyone. It's great to be here!", | ||
| 62 | // other fields... | ||
| 63 | } | ||
| 64 | ``` | ||
| 65 | |||
| 66 | ### Nested replies | ||
| 67 | |||
| 68 | For nested replies, the uppercase tags should still refer to the community definition, while the lowercase tags should refer to the parent post or reply. | ||
| 45 | 69 | ||
| 46 | ```jsonc | 70 | ```jsonc |
| 47 | { | 71 | { |
| 48 | "kind": 1, | 72 | "kind": 1111, |
| 49 | "tags": [ | 73 | "tags": [ |
| 50 | ["a", "34550:<community event author pubkey>:<community-d-identifier>", "<optional-relay-url>"], | 74 | // community definition itself |
| 75 | ["A", "34550:<community-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"], | ||
| 76 | ["P", "<community-author-pubkey>", "<optional-relay-url>"], | ||
| 77 | ["K", "34550"], | ||
| 78 | |||
| 79 | // parent post or reply | ||
| 80 | ["e", "<parent-event-id>", "<optional-relay-url>"], | ||
| 81 | ["p", "<parent-event-author-pubkey>", "<optional-relay-url>"], | ||
| 82 | ["k", "<parent-event-kind>"] // most likely "1111" | ||
| 51 | ], | 83 | ], |
| 52 | "content": "hello world", | 84 | "content": "Agreed! Welcome everyone!", |
| 53 | // other fields... | 85 | // other fields... |
| 54 | } | 86 | } |
| 55 | ``` | 87 | ``` |
| 56 | 88 | ||
| 57 | # Moderation | 89 | ### Backwards compatibility note |
| 90 | |||
| 91 | Previously kind 1 events were used for posts in communities, with an "a" tag pointing to the community. For backwards compatibility, clients MAY still query for kind 1 events, but SHOULD NOT use them for new posts. Instead, clients SHOULD use kind 1111 events with the `A` and `a` tags as described above. | ||
| 92 | |||
| 93 | ## Moderation | ||
| 58 | 94 | ||
| 59 | Anyone may issue an approval event to express their opinion that a post is appropriate for a community. Clients MAY choose which approval events to honor, but SHOULD at least use ones published by the group's defined moderators. | 95 | Anyone may issue an approval event to express their opinion that a post is appropriate for a community. Clients MAY choose which approval events to honor, but SHOULD at least use ones published by the group's defined moderators. |
| 60 | 96 | ||
| @@ -91,6 +127,6 @@ Since relays are instructed to delete old versions of a replaceable event, the ` | |||
| 91 | 127 | ||
| 92 | Clients SHOULD evaluate any non-`34550:*` `a` tag as posts to be approved for all `34550:*` `a` tags. | 128 | Clients SHOULD evaluate any non-`34550:*` `a` tag as posts to be approved for all `34550:*` `a` tags. |
| 93 | 129 | ||
| 94 | # Cross-posting | 130 | ## Cross-posting |
| 95 | 131 | ||
| 96 | Clients MAY support cross-posting between communities by posting a NIP 18 `kind 6` or `kind 16` repost to one or more communities using `a` tags as described above. The `content` of the repost MUST be the original event, not the approval event. | 132 | Clients MAY support cross-posting between communities by posting a NIP 18 `kind 6` or `kind 16` repost to one or more communities using `a` tags as described above. The `content` of the repost MUST be the original event, not the approval event. |