diff options
| author | fiatjaf <fiatjaf@gmail.com> | 2024-10-21 13:45:51 -0300 |
|---|---|---|
| committer | fiatjaf <fiatjaf@gmail.com> | 2024-10-21 13:47:02 -0300 |
| commit | e3cf02840d382360a604a7506e1b9608c63c4002 (patch) | |
| tree | a184358d39cbbfe8d2a020de5311147c2235a4d1 /29.md | |
| parent | 765daceaa1a25a0324864668cf977cbdcb30bbd4 (diff) | |
rename "claim"=>"code", get rid of kind 9006 (just use 9000), add a paragraph explaining moderation.
Diffstat (limited to '29.md')
| -rw-r--r-- | 29.md | 17 |
1 files changed, 11 insertions, 6 deletions
| @@ -42,6 +42,14 @@ This is a hack to prevent messages from being broadcasted to external relays tha | |||
| 42 | 42 | ||
| 43 | Relays should prevent late publication (messages published now with a timestamp from days or even hours ago) unless they are open to receive a group forked or moved from another relay. | 43 | Relays should prevent late publication (messages published now with a timestamp from days or even hours ago) unless they are open to receive a group forked or moved from another relay. |
| 44 | 44 | ||
| 45 | ## Group management | ||
| 46 | |||
| 47 | Groups can have any number of users with elevated access. These users are identified by role labels which are arbitrarily defined by the relays (see also the description of `kind:39003`). What each role is capable of not defined in this NIP either, it's a relay policy that can vary. Roles can be assigned by other users (as long as they have the capability to add roles) by publishing a `kind:9000` event with that user's pubkey in a `p` tag and the roles afterwards (even if the user is already a group member a `kind:9000` can be issued and the user roles must just be updated). | ||
| 48 | |||
| 49 | The roles supported by the group as to having some special privilege assigned to them should be accessible on the event `kind:39003`, but the relay may also accept other role names, arbitrarily defined by clients, and just not do anything with them. | ||
| 50 | |||
| 51 | Users with any roles that have any privilege can be considered _admins_ in a broad sense and be returned in the `kind:39001` event for a group. | ||
| 52 | |||
| 45 | ## Unmanaged groups | 53 | ## Unmanaged groups |
| 46 | 54 | ||
| 47 | Unmanaged groups are impromptu groups that can be used in any public relay unaware of NIP-29 specifics. They piggyback on relays' natural white/blacklists (or lack of) but aside from that are not actively managed and won't have any admins, group state or metadata events. | 55 | Unmanaged groups are impromptu groups that can be used in any public relay unaware of NIP-29 specifics. They piggyback on relays' natural white/blacklists (or lack of) but aside from that are not actively managed and won't have any admins, group state or metadata events. |
| @@ -117,12 +125,12 @@ Any user can send one of these events to the relay in order to be automatically | |||
| 117 | "content": "optional reason", | 125 | "content": "optional reason", |
| 118 | "tags": [ | 126 | "tags": [ |
| 119 | ["h", "<group-id>"], | 127 | ["h", "<group-id>"], |
| 120 | ["claim", "<optional-invite-code>"] | 128 | ["code", "<optional-invite-code>"] |
| 121 | ] | 129 | ] |
| 122 | } | 130 | } |
| 123 | ``` | 131 | ``` |
| 124 | 132 | ||
| 125 | The optional `claim` tag may be used by the relay to preauthorize acceptances in `closed` groups, together with the `kind:9009` `create-invite` moderation event. | 133 | 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. |
| 126 | 134 | ||
| 127 | - *leave request* (`kind:9022`) | 135 | - *leave request* (`kind:9022`) |
| 128 | 136 | ||
| @@ -161,13 +169,10 @@ Each moderation action uses a different kind and requires different arguments, w | |||
| 161 | 169 | ||
| 162 | | kind | name | tags | | 170 | | kind | name | tags | |
| 163 | | --- | --- | --- | | 171 | | --- | --- | --- | |
| 164 | | 9000 | `add-user` | `p` with pubkey hex | | 172 | | 9000 | `add-user` | `p` with pubkey hex and optional roles | |
| 165 | | 9001 | `remove-user` | `p` with pubkey hex | | 173 | | 9001 | `remove-user` | `p` with pubkey hex | |
| 166 | | 9002 | `edit-metadata` | fields from `kind:39000` to be modified | | 174 | | 9002 | `edit-metadata` | fields from `kind:39000` to be modified | |
| 167 | | 9003 | | | | ||
| 168 | | 9004 | | | | ||
| 169 | | 9005 | `delete-event` | | | 175 | | 9005 | `delete-event` | | |
| 170 | | 9006 | `set-role` | `p` with pubkey hex and roles | | ||
| 171 | | 9007 | `create-group` | | | 176 | | 9007 | `create-group` | | |
| 172 | | 9008 | `delete-group` | | | 177 | | 9008 | `delete-group` | | |
| 173 | 178 | ||