add more kinds.

This commit is contained in:
fiatjaf 2023-10-28 13:50:09 -03:00
parent 2f403e1e95
commit 7bac93607f
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

29
72.md
View File

@ -14,7 +14,6 @@ The goal of this NIP is to create moderator-approved public communities around a
```json
{
"created_at": <Unix timestamp in seconds>,
"kind": 34550,
"tags": [
["d", "<community-d-identifier>"],
@ -40,11 +39,23 @@ The goal of this NIP is to create moderator-approved public communities around a
# New Post Request
Any Nostr event can be submitted to a community by anyone for approval. Clients MUST add the community's `a` tag to the new post event in order to be presented for the moderator's approval.
A "post request" is an event that can be published by anyone with the intention to be displayed inside a community. Moderators will be notified of this request and decide about approving it or not. Only after approval these posts will be displayed inside the communities.
Event kinds defined in other NIPs can be supported inside communities, but here we defined kind translations for them such that they don't get confused with events published outside communities.
| Community-scoped Kind | Description | Original Kind | Original NIP |
| --- | --- | --- | --- |
| 11 | Community post | 1 | 1 |
| 10500 | Community-scoped user metadata | 0 | 1 |
| 10501 | Community-scoped follow list | 3 | 2 |
| 4548 | Community file metadata | 1063 | 94 |
| 30500 | Community long-form article | 23 | 23 |
So, for example, in order to publish a "text note" (`kind:1`) inside a community one must use the `kind:11` instead.
```json
{
"kind": 4549,
"kind": 11,
"tags": [
["a", "34550:<community event author pubkey>:<community-d-identifier>", "<optional-relay-url>"],
],
@ -53,8 +64,6 @@ Any Nostr event can be submitted to a community by anyone for approval. Clients
}
```
Community management clients MAY filter all mentions to a given `kind:34550` event and request moderators to approve each submission. Moderators MAY delete his/her approval of a post at any time using event deletions (See [NIP-09](09.md)).
# Post Approval by moderators
The post-approval event MUST include `a` tags of the communities the moderator is posting into (one or more), the `e` tag of the post and `p` tag of the author of the post (for approval notifications). The event SHOULD also include the stringified `post request` event inside the `.content` ([NIP-18-style](18.md)) and a `k` tag with the original post's event kind to allow filtering of approved posts by kind.
@ -99,13 +108,3 @@ The following filter displays the approved posts.
```
Clients MAY hide approvals by blocked moderators at the user's request.
# Other kinds of Community-scoped Events
Clients MAY decide to support multiple other kinds to be published for consumption only inside a specific community. These kinds follow the same structure defined for them in other NIPs, but with a different kind number:
| Community-scoped Kind | Original Kind | Original NIP |
| ----------------------- | --------------- | -------------- |
| 4549 | 1 | 1 |
| 30500 | 23 | 23 |
| 10500 | 0 | 1 |