You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
["x", "<the SHA-256 hexencoded string of the file>"],
62
62
// rest of tags...
63
63
],
@@ -74,24 +74,24 @@ Kind 15 is used for sending encrypted file event messages:
74
74
-`content`: The URL of the file (`<file-url>`).
75
75
-`x` containing the SHA-256 hexencoded string of the file.
76
76
-`size` (optional) size of file in bytes
77
-
-`dim` (optional) size of file in pixels in the form `<width>x<height>`
78
-
-`blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the file is being loaded by the client
79
-
-`thumb` (optional) url of thumbnail with same aspect ratio
77
+
-`dim` (optional) size of the file in pixels in the form `<width>x<height>`
78
+
-`blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the client is loading the file
79
+
-`thumb` (optional) URL of thumbnail with same aspect ratio (encrypted with the same key, nonce)
80
80
-`fallback` (optional) zero or more fallback file sources in case `url` fails
81
81
82
82
Just like kind 14, kind `15`s MUST never be signed.
83
83
84
84
## Chat Rooms
85
85
86
-
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 clean message history.
86
+
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
87
88
88
Clients SHOULD render messages of the same room in a continuous thread.
89
89
90
90
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 thread is the subject of the conversation.
91
91
92
92
## Encrypting
93
93
94
-
Following [NIP-59](59.md), the **unsigned**`kind:14` & `kind:15` chat message must be sealed (`kind:13`) and then gift-wrapped (`kind:1059`) to each receiver and the sender individually.
94
+
Following [NIP-59](59.md), the **unsigned**`kind:14` & `kind:15` chat messages must be sealed (`kind:13`) and then gift-wrapped (`kind:1059`) to each receiver and the sender individually.
95
95
96
96
```jsonc
97
97
{
@@ -173,7 +173,7 @@ The main limitation of this approach is having to send a separate encrypted even
173
173
174
174
Clients implementing this NIP should by default only connect to the set of relays found in their `kind:10050` list. From that they should be able to load all messages both sent and received as well as get new live updates, making it for a very simple and lightweight implementation that should be fast.
175
175
176
-
When sending a message to anyone, clients must then connect to the relays in the receiver's `kind:10050` and send the events there, but can disconnect right after unless more messages are expected to be sent (e.g. the chat tab is still selected). Clients should also send a copy of their outgoing messages to their own `kind:10050` relay set.
176
+
When sending a message to anyone, clients must then connect to the relays in the receiver's `kind:10050` and send the events there but can disconnect right after unless more messages are expected to be sent (e.g. the chat tab is still selected). Clients should also send a copy of their outgoing messages to their own `kind:10050` relay set.
0 commit comments