upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/29.md
diff options
context:
space:
mode:
Diffstat (limited to '29.md')
-rw-r--r--29.md17
1 files changed, 11 insertions, 6 deletions
diff --git a/29.md b/29.md
index c0dbcef..c4ee495 100644
--- a/29.md
+++ b/29.md
@@ -42,6 +42,14 @@ This is a hack to prevent messages from being broadcasted to external relays tha
42 42
43Relays 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. 43Relays 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
47Groups 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
49The 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
51Users 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
47Unmanaged 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. 55Unmanaged 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
125The optional `claim` tag may be used by the relay to preauthorize acceptances in `closed` groups, together with the `kind:9009` `create-invite` moderation event. 133The 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