mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-12-08 16:18:50 +00:00
NIP-29: Add optional protected events and original relay tracking
- Change group identifier format from "may" to "must" for consistency - Add optional NIP-70 protected events tag as alternative to timeline references - Add optional "original_relay" tag to track where group was first created - Helps maintain group integrity and trace group origins across forks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
11
29.md
11
29.md
@@ -20,7 +20,7 @@ Relays are supposed to generate the events that describe group metadata and grou
|
||||
|
||||
## Group identifier
|
||||
|
||||
A group may be identified by a string in the format `<host>'<group-id>`. For example, a group with _id_ `abcdef` hosted at the relay `wss://groups.nostr.com` would be identified by the string `groups.nostr.com'abcdef`.
|
||||
A group must be identified by a string in the format `<host>'<group-id>`. For example, a group with _id_ `abcdef` hosted at the relay `wss://groups.nostr.com` would be identified by the string `groups.nostr.com'abcdef`.
|
||||
|
||||
Group identifiers must be strings restricted to the characters `a-z0-9-_`, and SHOULD be random in order to avoid name collisions.
|
||||
|
||||
@@ -30,6 +30,10 @@ When encountering just the `<host>` without the `'<group-id>`, clients MAY infer
|
||||
|
||||
Events sent by users to groups (chat messages, text notes, moderation events etc) MUST have an `h` tag with the value set to the group _id_.
|
||||
|
||||
## Protected events
|
||||
|
||||
Events sent to a group MAY include the [NIP-70](70.md) `-` tag to mark them as protected events. This ensures that group messages can only be published to the intended relay by their original authors, preventing unauthorized republishing to other relays and maintaining the integrity of group discussions within their designated relay. This provides an alternative or additional method to timeline references for keeping group messages from being taken out of context.
|
||||
|
||||
## Timeline references
|
||||
|
||||
In order to not be used out of context, events sent to these groups may contain references to previous events seen from the same relay in the `previous` tag. The choice of which previous events to pick belongs to the clients. The references are to be made using the first 8 characters (4 bytes) of any event in the last 50 events seen by the user in the relay, excluding events by themselves. There can be any number of references (including zero), but it's recommended that clients include at least 3 and that relays enforce this.
|
||||
@@ -154,13 +158,14 @@ When this event is not found, clients may still connect to the group, but treat
|
||||
["picture", "https://pizza.com/pizza.png"],
|
||||
["about", "a group for people who love pizza"],
|
||||
["public"], // or ["private"]
|
||||
["open"] // or ["closed"]
|
||||
["open"], // or ["closed"]
|
||||
["original_relay", "wss://original.relay.com"] // optional: original relay where group was created
|
||||
]
|
||||
// other fields...
|
||||
}
|
||||
```
|
||||
|
||||
`name`, `picture` and `about` are basic metadata for the group for display purposes. `public` signals the group can be _read_ by anyone, while `private` signals that only AUTHed users can read. `open` signals that anyone can request to join and the request will be automatically granted, while `closed` signals that members must be pre-approved or that requests to join will be manually handled.
|
||||
`name`, `picture` and `about` are basic metadata for the group for display purposes. `public` signals the group can be _read_ by anyone, while `private` signals that only AUTHed users can read. `open` signals that anyone can request to join and the request will be automatically granted, while `closed` signals that members must be pre-approved or that requests to join will be manually handled. `original_relay` (optional) indicates the relay where the group was originally created, allowing clients to track the group's origin even when it has been forked to other relays.
|
||||
|
||||
- *group admins* (`kind:39001`) (optional)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user