mirror of
https://github.com/nostr-protocol/nips.git
synced 2026-07-22 07:48:25 +00:00
32 lines
606 B
Markdown
32 lines
606 B
Markdown
NIP-C7
|
|
======
|
|
|
|
Chats
|
|
-----
|
|
|
|
`draft` `optional`
|
|
|
|
A chat message is a `kind 9` event.
|
|
|
|
```json
|
|
{
|
|
"kind": 9,
|
|
"content": "GM",
|
|
"tags": []
|
|
}
|
|
```
|
|
|
|
A reply to a `kind 9` is an additional `kind 9` which quotes the parent using a `q` tag.
|
|
|
|
```json
|
|
{
|
|
"kind": 9,
|
|
"content": "nostr:nevent1...\nyes",
|
|
"tags": [
|
|
["q", <event-id>, <relay-url>, <pubkey>]
|
|
]
|
|
}
|
|
```
|
|
|
|
Clients that render a "chat view" as a stream of ordered events MUST only fetch `kind 9` events in order to prevent missing context across implementations. Other content types MAY be quoted within in a `kind 9` following [NIP 18](./18.md).
|