diff options
| -rw-r--r-- | 29.md | 33 |
1 files changed, 10 insertions, 23 deletions
| @@ -66,12 +66,12 @@ These are the events expected to be found in NIP-29 groups. | |||
| 66 | 66 | ||
| 67 | These events generally can be sent by all members of a group and they require the `h` tag to be present so they're attached to a specific group. | 67 | These events generally can be sent by all members of a group and they require the `h` tag to be present so they're attached to a specific group. |
| 68 | 68 | ||
| 69 | - *text root note* (`kind:11`) | 69 | - _chat message_ (`kind:9`) |
| 70 | 70 | ||
| 71 | This is the basic unit of a "microblog" root text note sent to a group. | 71 | This is the basic unit of a _chat message_ sent to a group. |
| 72 | 72 | ||
| 73 | ```jsonc | 73 | ```jsonc |
| 74 | "kind": 11, | 74 | "kind": 9, |
| 75 | "content": "hello my friends lovers of pizza", | 75 | "content": "hello my friends lovers of pizza", |
| 76 | "tags": [ | 76 | "tags": [ |
| 77 | ["h", "<group-id>"], | 77 | ["h", "<group-id>"], |
| @@ -80,19 +80,12 @@ This is the basic unit of a "microblog" root text note sent to a group. | |||
| 80 | // other fields... | 80 | // other fields... |
| 81 | ``` | 81 | ``` |
| 82 | 82 | ||
| 83 | - *threaded text reply* (`kind:12`) | 83 | - _thread root post_ (`kind:11`) |
| 84 | |||
| 85 | This is the basic unit of a "microblog" reply note sent to a group. It's the same as `kind:11`, except for the fact that it must be used whenever it's in reply to some other note (either in reply to a `kind:11` or a `kind:12`). `kind:12` events SHOULD use NIP-10 markers, leaving an empty relay url: | ||
| 86 | |||
| 87 | * `["e", "<kind-11-root-id>", "", "root"]` | ||
| 88 | * `["e", "<kind-12-event-id>", "", "reply"]` | ||
| 89 | |||
| 90 | - *chat message* (`kind:9`) | ||
| 91 | 84 | ||
| 92 | This is the basic unit of a _chat message_ sent to a group. | 85 | This is the basic unit of a forum-like root thread post sent to a group. |
| 93 | 86 | ||
| 94 | ```jsonc | 87 | ```jsonc |
| 95 | "kind": 9, | 88 | "kind": 11, |
| 96 | "content": "hello my friends lovers of pizza", | 89 | "content": "hello my friends lovers of pizza", |
| 97 | "tags": [ | 90 | "tags": [ |
| 98 | ["h", "<group-id>"], | 91 | ["h", "<group-id>"], |
| @@ -101,15 +94,9 @@ This is the basic unit of a _chat message_ sent to a group. | |||
| 101 | // other fields... | 94 | // other fields... |
| 102 | ``` | 95 | ``` |
| 103 | 96 | ||
| 104 | - *chat message threaded reply* (`kind:10`) | 97 | - _other events_: |
| 105 | |||
| 106 | Similar to `kind:12`, this is the basic unit of a chat message sent to a group. This is intended for in-chat threads that may be hidden by default. Not all in-chat replies MUST use `kind:10`, only when the intention is to create a hidden thread that isn't part of the normal flow of the chat (although clients are free to display those by default too). | ||
| 107 | |||
| 108 | `kind:10` SHOULD use NIP-10 markers, just like `kind:12`. | ||
| 109 | |||
| 110 | - other events: | ||
| 111 | 98 | ||
| 112 | Groups may also accept other events, like long-form articles, calendar, livestream, market announcements and so on. These should be as defined in their respective NIPs, with the addition of the `h` tag. | 99 | Groups may also accept other events, like [NIP-22](22.md) comments as threaded replies to both chats messages and threads, long-form articles, calendar, livestreams, market announcements and so on. These should be as defined in their respective NIPs, with the addition of the `h` tag. |
| 113 | 100 | ||
| 114 | ### User-related group management events | 101 | ### User-related group management events |
| 115 | 102 | ||
| @@ -169,10 +156,10 @@ Each moderation action uses a different kind and requires different arguments, w | |||
| 169 | 156 | ||
| 170 | | kind | name | tags | | 157 | | kind | name | tags | |
| 171 | | --- | --- | --- | | 158 | | --- | --- | --- | |
| 172 | | 9000 | `add-user` | `p` with pubkey hex and optional roles | | 159 | | 9000 | `put-user` | `p` with pubkey hex and optional roles | |
| 173 | | 9001 | `remove-user` | `p` with pubkey hex | | 160 | | 9001 | `remove-user` | `p` with pubkey hex | |
| 174 | | 9002 | `edit-metadata` | fields from `kind:39000` to be modified | | 161 | | 9002 | `edit-metadata` | fields from `kind:39000` to be modified | |
| 175 | | 9005 | `delete-event` | | | 162 | | 9005 | `delete-event` | `e` with event id hex | |
| 176 | | 9007 | `create-group` | | | 163 | | 9007 | `create-group` | | |
| 177 | | 9008 | `delete-group` | | | 164 | | 9008 | `delete-group` | | |
| 178 | | 9009 | `create-invite` | | | 165 | | 9009 | `create-invite` | | |