From 82fffa05807f75c49ce322170e73ec538b998959 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Jul 2025 00:58:51 -0400 Subject: [PATCH] NIP-72: use kind 1111 events for text notes (#1953) --- 72.md | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/72.md b/72.md index 582410ad..11172904 100644 --- a/72.md +++ b/72.md @@ -41,19 +41,55 @@ The goal of this NIP is to enable public communities. It defines the replaceable # Posting to a community -Any Nostr event can be posted to a community. Clients MUST add one or more community `a` tags, each with a recommended relay. +[NIP-22](NIP-22) kind 1111 events SHOULD be used for text notes posted to a community, with the `A` tag always scoped to the community definition. + +## Top-level posts + +For top-level posts, the uppercase and lowercase NIP-22 tags should both refer to the community definition itself. ```jsonc { - "kind": 1, + "kind": 1111, "tags": [ - ["a", "34550::", ""], + ["A", "34550::", ""], + ["a", "34550::", ""], + ["P", "", ""], + ["p", "", ""], + ["K", "34550"], + ["k", "34550"], ], - "content": "hello world", + "content": "Hi everyone. It's great to be here!", // other fields... } ``` +## Nested replies + +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. + +```jsonc +{ + "kind": 1111, + "tags": [ + // community definition itself + ["A", "34550::", ""], + ["P", "", ""], + ["K", "34550"], + + // parent post or reply + ["e", "", ""], + ["p", "", ""], + ["k", ""] // most likely "1111" + ], + "content": "Agreed! Welcome everyone!", + // other fields... +} +``` + +## Backwards compatibility note + +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. + # Moderation 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.