Skip to content

Commit

Permalink
Attempt to reconcile kind 9/209 and 11/309
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Staab committed Nov 20, 2024
1 parent 5e99b6f commit 336f5eb
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 135 deletions.
34 changes: 1 addition & 33 deletions 29.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,39 +64,7 @@ These are the events expected to be found in NIP-29 groups.

### Normal user-created events

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.

- _chat message_ (`kind:9`)

This is the basic unit of a _chat message_ sent to a group.

```jsonc
"kind": 9,
"content": "hello my friends lovers of pizza",
"tags": [
["h", "<group-id>"],
["previous", "<event-id-first-chars>", "<event-id-first-chars>", /*...*/]
]
// other fields...
```

- _thread root post_ (`kind:11`)

This is the basic unit of a forum-like root thread post sent to a group.

```jsonc
"kind": 11,
"content": "hello my friends lovers of pizza",
"tags": [
["h", "<group-id>"],
["previous", "<event-id-first-chars>", "<event-id-first-chars>", /*...*/]
]
// other fields...
```

- _other events_:

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.
Groups may accept any event kind, including chats, 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.

### User-related group management events

Expand Down
23 changes: 23 additions & 0 deletions chat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
NIP-XX
======

Chats
-----

`draft` `optional`

A chat message is a `kind 9` event. Chat messages are intended to be used as a
high-frequency, informal, context-aware communication medium. In other words,
chat messages should be displayed sequentially alongside other messages.

```json
{
"kind": 9,
"content": "GM",
"tags": []
}
```

Replies to `kind 9` MUST use [NIP-73](https://github.com/nostr-protocol/nips/pull/1233)
`kind 1111`. Clients SHOULD encourage flat reply hierarchies. If an `h` or `~` tag is used
on the `kind 9`, a reply MUST copy it from its parent.
25 changes: 25 additions & 0 deletions threads.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
NIP-XX
======

Threads
-------

`draft` `optional`

A thread is a `kind 11` event. Threads and their replies are intended to be used
as a low-frequency, more formal, context-aware communication medium. Threads
SHOULD include a `title` with a summary of the `content`.

```json
{
"kind": 11,
"content": "Good morning",
"tags": [
["title", "GM"]
]
}
```

Replies to `kind 11` MUST use [NIP-73](https://github.com/nostr-protocol/nips/pull/1233)
`kind 1111` comments. Clients SHOULD encourage flat reply hierarchies. If an `h` or `~`
tag is used on the `kind 11`, a reply MUST copy it from its parent.
102 changes: 0 additions & 102 deletions xx.md

This file was deleted.

0 comments on commit 336f5eb

Please sign in to comment.