mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
Add support for naming unmanaged groups
This commit is contained in:
parent
ef1746dd2c
commit
43767e1e53
12
29.md
12
29.md
|
@ -22,15 +22,15 @@ Relays are supposed to generate the events that describe group metadata and grou
|
||||||
|
|
||||||
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 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`.
|
||||||
|
|
||||||
Group identifiers must be strings restricted to the characters `a-z0-9-_`.
|
Group identifiers must be strings restricted to the characters `a-z0-9-_`, and SHOULD be random in order to avoid name collisions.
|
||||||
|
|
||||||
When encountering just the `<host>` without the `'<group-id>`, clients can choose to connect to the group with id `_`, which is a special top-level group dedicated to relay-local discussions.
|
When encountering just the `<host>` without the `'<group-id>`, clients MAY infer `_` as the group id, which is a special top-level group dedicated to relay-local discussions.
|
||||||
|
|
||||||
Group identifiers in most cases should be random or pseudo-random, as that mitigates message replay confusion and ensures they can be migrated or forked to other relays easily without risking conflicting with other groups using the same id in these new relays. This isn't a hard rule, as, for example, in `unmanaged` and/or ephemeral relays groups might not want to migrate ever, so they might not care about this. Notably, the `_` relay-local group isn't expected to be migrated ever.
|
|
||||||
|
|
||||||
## The `h` tag
|
## The `h` tag
|
||||||
|
|
||||||
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_.
|
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_.
|
||||||
|
|
||||||
|
`h` tags MAY include the group's name as the second argument. This allows `unmanaged` groups to be assigned human-readable names without relay support.
|
||||||
|
|
||||||
## Timeline references
|
## Timeline references
|
||||||
|
|
||||||
|
@ -241,4 +241,4 @@ A definition for `kind:10009` was included in [NIP-51](51.md) that allows client
|
||||||
|
|
||||||
### Using `unmanaged` relays
|
### Using `unmanaged` relays
|
||||||
|
|
||||||
To prevent event leakage, replay and confusion, when using `unmanaged` relays, clients should include the [NIP-70](70.md) `-` tag, as just the `previous` tag won't be checked by other `unmanaged` relays.
|
To prevent event leakage, when using `unmanaged` relays, clients should include the [NIP-70](70.md) `-` tag, as just the `previous` tag won't be checked by other `unmanaged` relays.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user