mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-14 07:49:07 -05:00
rename "claim"=>"code", get rid of kind 9006 (just use 9000), add a paragraph explaining moderation.
This commit is contained in:
parent
765daceaa1
commit
e3cf02840d
17
29.md
17
29.md
|
@ -42,6 +42,14 @@ This is a hack to prevent messages from being broadcasted to external relays tha
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
## Group management
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
## Unmanaged groups
|
## Unmanaged groups
|
||||||
|
|
||||||
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.
|
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
|
||||||
"content": "optional reason",
|
"content": "optional reason",
|
||||||
"tags": [
|
"tags": [
|
||||||
["h", "<group-id>"],
|
["h", "<group-id>"],
|
||||||
["claim", "<optional-invite-code>"]
|
["code", "<optional-invite-code>"]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
- *leave request* (`kind:9022`)
|
- *leave request* (`kind:9022`)
|
||||||
|
|
||||||
|
@ -161,13 +169,10 @@ Each moderation action uses a different kind and requires different arguments, w
|
||||||
|
|
||||||
| kind | name | tags |
|
| kind | name | tags |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| 9000 | `add-user` | `p` with pubkey hex |
|
| 9000 | `add-user` | `p` with pubkey hex and optional roles |
|
||||||
| 9001 | `remove-user` | `p` with pubkey hex |
|
| 9001 | `remove-user` | `p` with pubkey hex |
|
||||||
| 9002 | `edit-metadata` | fields from `kind:39000` to be modified |
|
| 9002 | `edit-metadata` | fields from `kind:39000` to be modified |
|
||||||
| 9003 | | |
|
|
||||||
| 9004 | | |
|
|
||||||
| 9005 | `delete-event` | |
|
| 9005 | `delete-event` | |
|
||||||
| 9006 | `set-role` | `p` with pubkey hex and roles |
|
|
||||||
| 9007 | `create-group` | |
|
| 9007 | `create-group` | |
|
||||||
| 9008 | `delete-group` | |
|
| 9008 | `delete-group` | |
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user