Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

NIP-29: some small tweaks #1574

Merged
merged 4 commits into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 10 additions & 23 deletions 29.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ These are the events expected to be found in NIP-29 groups.

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.

- *text root note* (`kind:11`)
- _chat message_ (`kind:9`)

This is the basic unit of a "microblog" root text note sent to a group.
This is the basic unit of a _chat message_ sent to a group.

```jsonc
"kind": 11,
"kind": 9,
"content": "hello my friends lovers of pizza",
"tags": [
["h", "<group-id>"],
Expand All @@ -80,19 +80,12 @@ This is the basic unit of a "microblog" root text note sent to a group.
// other fields...
```

- *threaded text reply* (`kind:12`)

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:

* `["e", "<kind-11-root-id>", "", "root"]`
* `["e", "<kind-12-event-id>", "", "reply"]`

- *chat message* (`kind:9`)
- _thread root post_ (`kind:11`)

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

```jsonc
"kind": 9,
"kind": 11,
"content": "hello my friends lovers of pizza",
"tags": [
["h", "<group-id>"],
Expand All @@ -101,15 +94,9 @@ This is the basic unit of a _chat message_ sent to a group.
// other fields...
```

- *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`.

- other events:
- _other events_:

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.
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.

### User-related group management events

Expand Down Expand Up @@ -169,10 +156,10 @@ Each moderation action uses a different kind and requires different arguments, w

| kind | name | tags |
| --- | --- | --- |
| 9000 | `add-user` | `p` with pubkey hex and optional roles |
| 9000 | `put-user` | `p` with pubkey hex and optional roles |
| 9001 | `remove-user` | `p` with pubkey hex |
| 9002 | `edit-metadata` | fields from `kind:39000` to be modified |
| 9005 | `delete-event` | |
| 9005 | `delete-event` | `e` with event id hex |
| 9007 | `create-group` | |
| 9008 | `delete-group` | |
| 9009 | `create-invite` | |
Expand Down