diff options
| author | hodlbod <jstaab@protonmail.com> | 2025-12-19 05:50:19 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-19 10:50:19 -0300 |
| commit | fb18d4c74f5d1054c673fa9aa1e0778f3f70c8cc (patch) | |
| tree | e7479979376046edfdb50b9bf7ed7ee6f11e38f4 | |
| parent | 65a827dab317181760f6d1812b0cc17020b8c97b (diff) | |
Clarify closed/private, add hidden to nip 29 (#2106)
Co-authored-by: Jon Staab <shtaab@gmail.com>
| -rw-r--r-- | 29.md | 14 |
1 files changed, 9 insertions, 5 deletions
| @@ -83,7 +83,7 @@ Any user can send a kind `9021` event to the relay in order to request admission | |||
| 83 | } | 83 | } |
| 84 | ``` | 84 | ``` |
| 85 | 85 | ||
| 86 | The optional `code` tag may be used by the relay to preauthorize acceptances in `closed` groups, together with the `kind:9009` `create-invite` moderation event. | 86 | The optional `code` tag may be used by the relay to preauthorize acceptance, together with the `kind:9009` `create-invite` moderation event. |
| 87 | 87 | ||
| 88 | - *leave request* (`kind:9022`) | 88 | - *leave request* (`kind:9022`) |
| 89 | 89 | ||
| @@ -153,14 +153,18 @@ When this event is not found, clients may still connect to the group, but treat | |||
| 153 | ["name", "Pizza Lovers"], | 153 | ["name", "Pizza Lovers"], |
| 154 | ["picture", "https://pizza.com/pizza.png"], | 154 | ["picture", "https://pizza.com/pizza.png"], |
| 155 | ["about", "a group for people who love pizza"], | 155 | ["about", "a group for people who love pizza"], |
| 156 | ["public"], // or ["private"] | 156 | ["private"], |
| 157 | ["open"] // or ["closed"] | 157 | ["closed"] |
| 158 | ] | 158 | ] |
| 159 | // other fields... | 159 | // other fields... |
| 160 | } | 160 | } |
| 161 | ``` | 161 | ``` |
| 162 | 162 | ||
| 163 | `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. | 163 | - `name`, `picture` and `about` are basic metadata for the group for display purposes. |
| 164 | - `private` indicates that only members can _read_ group messages. Omitting this tag indicates that anyone can read group messages. | ||
| 165 | - `restricted` indicates that only members can _write_ messages to the group. Omitting this tag indicates that anyone can send messages to the group. | ||
| 166 | - `hidden` indicates that relays should hide group metadata from non-members. Omitting this tag indicates that anyone can request group metadata events. | ||
| 167 | - `closed` indicates that join requests are ignored. Omitting this tag indicates that users can expect join requests to be honored. | ||
| 164 | 168 | ||
| 165 | - *group admins* (`kind:39001`) (optional) | 169 | - *group admins* (`kind:39001`) (optional) |
| 166 | 170 | ||
| @@ -231,7 +235,7 @@ The latest of either `kind:9000` or `kind:9001` events present in a group should | |||
| 231 | 235 | ||
| 232 | ### Adding yourself to a group | 236 | ### Adding yourself to a group |
| 233 | 237 | ||
| 234 | When a group is `open`, anyone can send a `kind:9021` event to it in order to be added, then expect a `kind:9000` event to be emitted confirming that the user was added. The same happens with `closed` groups, except in that case a user may only send a `kind:9021` if it has an invite code. | 238 | Anyone can send a `kind:9021` join request to a group. The relay may then generate a `kind:9000` event immediately, or defer that decision to an administator. If a group is `closed`, join requests are not honored unless they include an invite code. |
| 235 | 239 | ||
| 236 | ### Storing your list of groups | 240 | ### Storing your list of groups |
| 237 | 241 | ||