mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-09 22:09:06 -05:00
add kind:10 threaded chat replies.
This commit is contained in:
parent
188f398c86
commit
e976d2f32d
25
29.md
25
29.md
|
@ -52,29 +52,16 @@ This is the basic unit of a "microblog" root text note sent to a group.
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
- *text reply note* (`kind:12`)
|
- *threaded text reply* (`kind:12`)
|
||||||
|
|
||||||
This is the basic unit of a "microblog" reply note sent to a group.
|
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:
|
||||||
|
|
||||||
```js
|
|
||||||
"kind": 12,
|
|
||||||
"content": "pizza is disgusting and you should be ashamed",
|
|
||||||
"tags": [
|
|
||||||
["h", "<group-id>"],
|
|
||||||
["e", "<reply-event-id>", "", "root"],
|
|
||||||
["previous", "<event-id-first-chars>", "<event-id-first-chars>", ...]
|
|
||||||
]
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
Replies SHOULD use NIP-10 markers, leaving an empty relay url:
|
|
||||||
|
|
||||||
* `["e", "<kind-11-root-id>", "", "root"]`
|
* `["e", "<kind-11-root-id>", "", "root"]`
|
||||||
* `["e", "<kind-12-event-id>", "", "reply"]`
|
* `["e", "<kind-12-event-id>", "", "reply"]`
|
||||||
|
|
||||||
- *chat message* (`kind:9`)
|
- *chat message* (`kind:9`)
|
||||||
|
|
||||||
Similar to `kind:11`, this is the basic unit of a chat message sent to a group.
|
This is the basic unit of a _chat message_ sent to a group.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
"kind": 9,
|
"kind": 9,
|
||||||
|
@ -86,6 +73,12 @@ Similar to `kind:11`, this is the basic unit of a chat message sent to a group.
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- *chat message threaded reply* (`kind:10`)
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
|
`kind:10` SHOULD use NIP-10 markers, just like `kind:12`.
|
||||||
|
|
||||||
- *join request* (`kind:9021`)
|
- *join request* (`kind:9021`)
|
||||||
|
|
||||||
Any user can send one of these events to the relay in order to be automatically or manually added to the group. If the group is `open` the relay will automatically issue a `kind:9000` in response adding this user. Otherwise group admins may choose to query for these requests and act upon them.
|
Any user can send one of these events to the relay in order to be automatically or manually added to the group. If the group is `open` the relay will automatically issue a `kind:9000` in response adding this user. Otherwise group admins may choose to query for these requests and act upon them.
|
||||||
|
|
|
@ -94,6 +94,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
|
||||||
| `7` | Reaction | [25](25.md) |
|
| `7` | Reaction | [25](25.md) |
|
||||||
| `8` | Badge Award | [58](58.md) |
|
| `8` | Badge Award | [58](58.md) |
|
||||||
| `9` | Group Chat Message | [29](29.md) |
|
| `9` | Group Chat Message | [29](29.md) |
|
||||||
|
| `10` | Group Chat Threaded Reply | [29](29.md) |
|
||||||
| `11` | Group Thread | [29](29.md) |
|
| `11` | Group Thread | [29](29.md) |
|
||||||
| `12` | Group Thread Reply | [29](29.md) |
|
| `12` | Group Thread Reply | [29](29.md) |
|
||||||
| `13` | Seal | [59](59.md) |
|
| `13` | Seal | [59](59.md) |
|
||||||
|
|
Loading…
Reference in New Issue
Block a user