diff options
| -rw-r--r-- | 29.md | 24 |
1 files changed, 13 insertions, 11 deletions
| @@ -99,14 +99,15 @@ Clients can send these events to a relay in order to accomplish a moderation act | |||
| 99 | 99 | ||
| 100 | Each moderation action uses a different kind and requires different arguments, which are given as tags. These are defined in the following table: | 100 | Each moderation action uses a different kind and requires different arguments, which are given as tags. These are defined in the following table: |
| 101 | 101 | ||
| 102 | | kind | name | tags | | 102 | | kind | name | tags | |
| 103 | | --- | --- | --- | | 103 | | --- | --- | --- | |
| 104 | | 9000 | `add-user` | `p` (pubkey hex) | | 104 | | 9000 | `add-user` | `p` (pubkey hex) | |
| 105 | | 9001 | `remove-user` | `p` (pubkey hex) | | 105 | | 9001 | `remove-user` | `p` (pubkey hex) | |
| 106 | | 9002 | `edit-metadata` | `name`, `about`, `picture` (string) | | 106 | | 9002 | `edit-metadata` | `name`, `about`, `picture` (string) | |
| 107 | | 9003 | `add-permission` | `p` (pubkey), `permission` (name) | | 107 | | 9003 | `add-permission` | `p` (pubkey), `permission` (name) | |
| 108 | | 9004 | `remove-permission` | `p` (pubkey), `permission` (name) | | 108 | | 9004 | `remove-permission` | `p` (pubkey), `permission` (name) | |
| 109 | | 9005 | `delete-event` | `e` (id hex) | | 109 | | 9005 | `delete-event` | `e` (id hex) | |
| 110 | | 9006 | `edit-group-status` | `public`, `open`, `private`, `closed` | | ||
| 110 | 111 | ||
| 111 | - *group metadata* (`kind:39000`) (optional) | 112 | - *group metadata* (`kind:39000`) (optional) |
| 112 | 113 | ||
| @@ -123,14 +124,14 @@ If the group is forked and hosted in multiple relays, there will be multiple ver | |||
| 123 | ["name", "Pizza Lovers"], | 124 | ["name", "Pizza Lovers"], |
| 124 | ["picture", "https://pizza.com/pizza.png"], | 125 | ["picture", "https://pizza.com/pizza.png"], |
| 125 | ["about", "a group for people who love pizza"], | 126 | ["about", "a group for people who love pizza"], |
| 126 | ["public"], | 127 | ["public"], // or ["private"] |
| 127 | ["open"] | 128 | ["open"] // or ["closed"] |
| 128 | ] | 129 | ] |
| 129 | ... | 130 | ... |
| 130 | } | 131 | } |
| 131 | ``` | 132 | ``` |
| 132 | 133 | ||
| 133 | `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. | 134 | `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. |
| 134 | 135 | ||
| 135 | The [NIP-19](19.md) `naddr` pointer for this event including with a mandatory relay can be used as the canonical group identifier. | 136 | The [NIP-19](19.md) `naddr` pointer for this event including with a mandatory relay can be used as the canonical group identifier. |
| 136 | 137 | ||
| @@ -148,6 +149,7 @@ The list of capabilities, as defined by this NIP, for now, is the following: | |||
| 148 | - `remove-user` | 149 | - `remove-user` |
| 149 | - `add-permission` | 150 | - `add-permission` |
| 150 | - `remove-permission` | 151 | - `remove-permission` |
| 152 | - `edit-group-status` | ||
| 151 | 153 | ||
| 152 | ```js | 154 | ```js |
| 153 | { | 155 | { |