Skip to content

Commit 166c811

Browse files
authored
Update 'Chatrooms' in 17.md
Specifies updated conventions for Direct Message Chatrooms in NIP-17. addresses issue nostr-protocol#1297 implemented in recent [PR for NDK](nostr-dev-kit/ndk#327)
1 parent 873afc5 commit 166c811

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

17.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,15 @@ Kind `15` is used for sending encrypted file event messages:
8282

8383
Just like kind `14`, kind `15`s MUST never be signed.
8484

85-
## Chat Rooms
85+
## Threads and Chatrooms
8686

87-
The set of `pubkey` + `p` tags defines a chat room. If a new `p` tag is added or a current one is removed, a new room is created with a clean message history.
87+
Without formally specifying an event kind for chatroom config, the following are conventions for achieving consistent direct message user experiences across clients.
8888

89-
Clients SHOULD render messages of the same room in a continuous thread.
89+
Clients SHOULD organize message events into 'threads'. A 'thread' SHOULD be a set of message events with a matching set of 'member' pubkeys (`pubkey` field + `p` tag values). Clients receiving or creating a message event with one or more different 'members' (from an existing 'thread') SHOULD add this message in a new thread with a clean message history.
9090

91-
An optional `subject` tag defines the current name/topic of the conversation. Any member can change the topic by simply submitting a new `subject` to an existing `pubkey` + `p` tags room. There is no need to send `subject` in every message. The newest `subject` in the chat room is the subject of the conversation.
91+
Clients MAY render one or more 'threads' as a 'chatroom'. Clients SHOULD render all messages of a single 'thread' in a single 'chatroom'. In the case of multiple 'threads' in a single 'chatroom', clients SHOULD indicate the 'members' alongside each message rendered in a 'chatroom', and clients SHOULD provide a means for selecting desired 'members' when authoring new messages.
92+
93+
A 'chatroom' MAY have a name or topic set (privately) by the end user OR for all 'thread members' by any message. The optional `subject` tag of any message events MAY be used to set the default name or topic of a 'chatroom'. In this case, the most recent message with a `subject` tag, in the set of 'chatroom threads', SHOULD be used to set the name or topic of the 'chatroom'.
9294

9395
## Encrypting
9496

0 commit comments

Comments
 (0)