mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 16:35:52 -05:00
public
and open
tags and join request event.
This commit is contained in:
parent
3e638eac5f
commit
50db74f93a
27
29.md
27
29.md
|
@ -66,17 +66,32 @@ Similar to `kind:11`, this is the basic unit of a chat message sent to a group.
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
- *moderation events* (`kinds:5;9000-9020`) (optional)
|
- *join request* (`kind:9021`)
|
||||||
|
|
||||||
|
Any user can send one of these events to the relay in order to be automatically or manually added to the group. If the group is `open` the relay will automatically issue a `kind:9000` in response adding this user. Otherwise group admins may choose to query for these requests and act upon them.
|
||||||
|
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
"kind": 9021,
|
||||||
|
"content": "optional reason",
|
||||||
|
"tags": [
|
||||||
|
["h", "<group-id>"],
|
||||||
|
["alt", "optional action description"]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- *moderation events* (`kinds:9000-9020`) (optional)
|
||||||
|
|
||||||
Clients can send these events to a relay in order to accomplish a moderation action. Relays must check if the pubkey sending the event is capable of performing the given action. The relay may discard the event after taking action or keep it as a moderation log.
|
Clients can send these events to a relay in order to accomplish a moderation action. Relays must check if the pubkey sending the event is capable of performing the given action. The relay may discard the event after taking action or keep it as a moderation log.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
"kind": 90xx,
|
"kind": 90xx,
|
||||||
"content": "",
|
"content": "optional reason",
|
||||||
"tags": [
|
"tags": [
|
||||||
["h", "<group-id>"],
|
["h", "<group-id>"],
|
||||||
["alt", "optional action description and/or reason"],
|
["alt", "optional action description"],
|
||||||
["previous", ...]
|
["previous", ...]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -107,12 +122,16 @@ If the group is forked and hosted in multiple relays, there will be multiple ver
|
||||||
["d", "<group-id>"],
|
["d", "<group-id>"],
|
||||||
["name", "Pizza Lovers"],
|
["name", "Pizza Lovers"],
|
||||||
["picture", "https://pizza.com/pizza.png"],
|
["picture", "https://pizza.com/pizza.png"],
|
||||||
["about", "a group for people who love pizza"]
|
["about", "a group for people who love pizza"],
|
||||||
|
["public"],
|
||||||
|
["open"]
|
||||||
]
|
]
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`name`, `picture` and `about` are basic metadata for the group for display purposes. `public` signals the group can be _read_ by anyone. `open` signals that anyone can request to join and the request will be automatically granted.
|
||||||
|
|
||||||
The [NIP-19](19.md) `naddr` pointer for this event including with a mandatory relay can be used as the canonical group identifier.
|
The [NIP-19](19.md) `naddr` pointer for this event including with a mandatory relay can be used as the canonical group identifier.
|
||||||
|
|
||||||
- *group admins* (`kind:39001`) (optional)
|
- *group admins* (`kind:39001`) (optional)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user