diff options
Diffstat (limited to '29.md')
| -rw-r--r-- | 29.md | 19 |
1 files changed, 18 insertions, 1 deletions
| @@ -16,7 +16,7 @@ Normally a group will originally belong to one specific relay, but the community | |||
| 16 | 16 | ||
| 17 | ## Relay-generated events | 17 | ## Relay-generated events |
| 18 | 18 | ||
| 19 | Relays are supposed to generate the events that describe group metadata and group admins. These are parameterized replaceable events signed by the relay keypair directly, with the group _id_ as the `d` tag. | 19 | Relays are supposed to generate the events that describe group metadata and group admins. These are _addressable_ events signed by the relay keypair directly, with the group _id_ as the `d` tag. |
| 20 | 20 | ||
| 21 | ## Group identifier | 21 | ## Group identifier |
| 22 | 22 | ||
| @@ -93,6 +93,20 @@ Any user can send one of these events to the relay in order to be automatically | |||
| 93 | } | 93 | } |
| 94 | ``` | 94 | ``` |
| 95 | 95 | ||
| 96 | - *leave request* (`kind:9022`) | ||
| 97 | |||
| 98 | Any user can send one of these events to the relay in order to be automatically removed from the group. The relay will automatically issue a `kind:9001` in response removing this user. | ||
| 99 | |||
| 100 | ```js | ||
| 101 | { | ||
| 102 | "kind": 9022, | ||
| 103 | "content": "optional reason", | ||
| 104 | "tags": [ | ||
| 105 | ["h", "<group-id>"] | ||
| 106 | ] | ||
| 107 | } | ||
| 108 | ``` | ||
| 109 | |||
| 96 | - *moderation events* (`kinds:9000-9020`) (optional) | 110 | - *moderation events* (`kinds:9000-9020`) (optional) |
| 97 | 111 | ||
| 98 | 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. | 112 | 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. |
| @@ -119,6 +133,8 @@ Each moderation action uses a different kind and requires different arguments, w | |||
| 119 | | 9004 | `remove-permission` | `p` (pubkey), `permission` (name) | | 133 | | 9004 | `remove-permission` | `p` (pubkey), `permission` (name) | |
| 120 | | 9005 | `delete-event` | `e` (id hex) | | 134 | | 9005 | `delete-event` | `e` (id hex) | |
| 121 | | 9006 | `edit-group-status` | `public` or `private`, `open` or `closed` | | 135 | | 9006 | `edit-group-status` | `public` or `private`, `open` or `closed` | |
| 136 | | 9007 | `create-group` | | | ||
| 137 | | 9008 | `delete-group` | | | ||
| 122 | 138 | ||
| 123 | - *group metadata* (`kind:39000`) (optional) | 139 | - *group metadata* (`kind:39000`) (optional) |
| 124 | 140 | ||
| @@ -159,6 +175,7 @@ The list of capabilities, as defined by this NIP, for now, is the following: | |||
| 159 | - `add-permission` | 175 | - `add-permission` |
| 160 | - `remove-permission` | 176 | - `remove-permission` |
| 161 | - `edit-group-status` | 177 | - `edit-group-status` |
| 178 | - `delete-group` | ||
| 162 | 179 | ||
| 163 | ```js | 180 | ```js |
| 164 | { | 181 | { |