diff --git a/NOSTR.md b/NOSTR.md index a3a021e490..bb9b911017 100644 --- a/NOSTR.md +++ b/NOSTR.md @@ -50,10 +50,10 @@ PGPASSWORD=buzz_dev psql -h localhost -U buzz -d buzz -c \ | **Reactions (kind:7)** | ✅ | Standard NIP-25; channel derived from target event's `#e` tag (client `#h` ignored) | | **Deletions (kind:5)** | ✅ | Standard NIP-09; self-authored only. `#h` optional, `#e` required | | **User profiles (kind:0)** | ✅ | NIP-01 metadata; synced to users table (display_name, avatar, about, NIP-05). NIP-05 handles must canonicalize to this relay's domain — off-domain or invalid handles are silently cleared. If a NIP-05 handle collides with another user's (UNIQUE constraint), the handle is skipped but other profile fields (display_name, avatar, about) are still synced. | -| **Group creation (kind:9007)** | ✅ | NIP-29; include `name` tag, optional `visibility` and `channel_type` | +| **Group creation (kind:9007)** | ✅ | NIP-29; include `name` tag, optional `visibility`, `channel_type` and label `t` tags | | **Add user (kind:9000)** | ✅ | Open: any user, subject to target's `channel_add_policy` (`owner_only`/`nobody` can block). Private: owner/admin only. Self-add bypasses agent policy but not private-channel auth. | | **Remove user (kind:9001)** | ✅ | Self-remove allowed (with last-owner guard). Removing others: owner/admin only. | -| **Edit group metadata (kind:9002)** | ✅ | `name`/`about` tags: owner/admin. `topic`/`purpose` tags: any member. | +| **Edit group metadata (kind:9002)** | ✅ | `name`/`about`/label `t` tags: owner/admin. `topic`/`purpose` tags: any member. | | **Admin delete event (kind:9005)** | ✅ | Event author can always delete own. Otherwise owner/admin required. Target must be in same channel. | | **Group deletion (kind:9008)** | ✅ | Owner only. | | **Leave group (kind:9022)** | ✅ | Any member. Last-owner guard prevents orphaned groups. | @@ -113,7 +113,9 @@ All discovery events include a `d` tag set to the channel UUID (NIP-29 addressab | **39001** | `d=`, `t=`, `P=`, `p` tags with role label (`owner`, `admin`) | Admin list | | **39002** | `d=`, `t=`, `P=`, `p` tags for all members | Member list | -On all three kinds the channel type `t` tag comes first, then `P`. `P` is +On all three kinds the channel type `t` tag comes first, then one `t` tag +per channel label, then `P`. Clients read the first `t` value as the +channel type. `P` is the public key that signed the channel's kind:9007. The relay writes it from the database, and it does not change when ownership moves. Uppercase `P` follows NIP-22, NIP-34 and NIP-72, where it names the author of the root @@ -124,6 +126,16 @@ kind:39000 also carries `["created_at", ]`: the time the channel was created. The event's own `created_at` is the time of the last edit, so use the tag to find the older of two channels. +**Channel labels.** A label groups channels across channel types, for +example `["t", "workspace"]`. Set labels with `["t",