Appearance
Kind 9002: Group Metadata Edit
Overview
This event is used to modify the metadata of a relay-based group. It allows group administrators to update information such as the group's name, picture, description, and visibility settings.
Specification
Property | Value |
---|---|
Kind Number | 9002 |
Event Range | Regular |
Defined in | NIP-29 |
Content Format
The content
field can contain an optional reason for the metadata edit.
Schema
"optional reason"
Tags
Tag Name | Description | Format | Required |
---|---|---|---|
h | Group identifier | ["h", "<group-id>"] | Yes |
name | Group name | ["name", "<group-name>"] | No |
picture | Group picture URL | ["picture", "<picture-url>"] | No |
about | Group description | ["about", "<description>"] | No |
public or private | Group visibility | ["public"] or ["private"] | No |
open or closed | Group join policy | ["open"] or ["closed"] | No |
previous | Timeline references | ["previous", "<event-id-prefix>"] | No, but recommended |
Client Behavior
Clients with appropriate permissions can send this event to modify a group's metadata. The client should include the group ID in the h
tag and any metadata fields to be modified as additional tags.
Clients should include timeline references in the previous
tag to prevent messages from being used out of context.
Relay Behavior
Relays should validate that:
- The sender has the appropriate permissions to edit the group's metadata.
- The event contains a valid
h
tag with the group ID. - The timeline references in the
previous
tag, if present, refer to events in the relay's database.
If validation succeeds, the relay should process the event, update the group's metadata accordingly, and generate or update the kind 39000 event for the group to reflect these changes.
Use Cases
- Updating a group's name or picture.
- Changing a group's visibility from public to private or vice versa.
- Updating a group's join policy from open to closed or vice versa.
- Modifying a group's description.
Example
json
{
"id": "...",
"pubkey": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"created_at": 1671217411,
"kind": 9002,
"tags": [
["h", "vegans-united"],
["name", "Vegans United"],
["about", "A place where vegans fight with each other"],
["picture", "https://vegans-united.com/new-logo.png"],
["public"],
["open"],
["previous", "a1b2c3d4"]
],
"content": "Updating our group description and name to be more professional",
"sig": "..."
}
References
Related Kinds
Notes
The event should only be accepted by relays if it comes from a user with appropriate permissions (e.g., a group admin with the capability to edit metadata).
After processing this event, the relay is expected to generate or update the corresponding kind 39000 event to reflect the metadata changes.