upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/17.md
diff options
context:
space:
mode:
authorFrancisco Calderón <fjcalderon@gmail.com>2024-11-04 15:39:21 -0300
committerGitHub <noreply@github.com>2024-11-04 15:39:21 -0300
commit03f3bc39678262ecbd5d870c9da44723023557ff (patch)
treee75ecf32d3bc906a8b26314488a1ae90996169c1 /17.md
parentf72a2f69ed93cf442e83bf9e7e16f6c06da40384 (diff)
parent6bcd89c097e97e65dbc95e7c6b7b8348e8dd6b5c (diff)
Merge branch 'master' into p2p-nip
Diffstat (limited to '17.md')
-rw-r--r--17.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/17.md b/17.md
index 0f51367..4b96bce 100644
--- a/17.md
+++ b/17.md
@@ -12,18 +12,18 @@ This NIP defines an encrypted direct messaging scheme using [NIP-44](44.md) encr
12 12
13Kind `14` is a chat message. `p` tags identify one or more receivers of the message. 13Kind `14` is a chat message. `p` tags identify one or more receivers of the message.
14 14
15```js 15```jsonc
16{ 16{
17 "id": "<usual hash>", 17 "id": "<usual hash>",
18  "pubkey": "<sender-pubkey>", 18  "pubkey": "<sender-pubkey>",
19 "created_at": now(), 19 "created_at": "<current-time>",
20  "kind": 14, 20  "kind": 14,
21  "tags": [ 21  "tags": [
22    ["p", "<receiver-1-pubkey>", "<relay-url>"], 22    ["p", "<receiver-1-pubkey>", "<relay-url>"],
23    ["p", "<receiver-2-pubkey>", "<relay-url>"], 23    ["p", "<receiver-2-pubkey>", "<relay-url>"],
24    ["e", "<kind-14-id>", "<relay-url>", "reply"] // if this is a reply 24    ["e", "<kind-14-id>", "<relay-url>", "reply"] // if this is a reply
25 ["subject", "<conversation-title>"], 25 ["subject", "<conversation-title>"],
26    ... 26    // rest of tags...
27  ], 27  ],
28  "content": "<message-in-plain-text>", 28  "content": "<message-in-plain-text>",
29} 29}
@@ -86,7 +86,7 @@ Clients CAN offer disappearing messages by setting an `expiration` tag in the gi
86 86
87Kind `10050` indicates the user's preferred relays to receive DMs. The event MUST include a list of `relay` tags with relay URIs. 87Kind `10050` indicates the user's preferred relays to receive DMs. The event MUST include a list of `relay` tags with relay URIs.
88 88
89```js 89```jsonc
90{ 90{
91 "kind": 10050, 91 "kind": 10050,
92 "tags": [ 92 "tags": [
@@ -94,7 +94,7 @@ Kind `10050` indicates the user's preferred relays to receive DMs. The event MUS
94 ["relay", "wss://myrelay.nostr1.com"], 94 ["relay", "wss://myrelay.nostr1.com"],
95 ], 95 ],
96 "content": "", 96 "content": "",
97 //...other fields 97 // other fields...
98} 98}
99``` 99```
100 100
@@ -102,7 +102,7 @@ Clients SHOULD publish kind `14` events to the `10050`-listed relays. If that is
102 102
103## Relays 103## Relays
104 104
105It's advisable that relays do not serve `kind:14` to clients other than the ones tagged in them. 105It's advisable that relays do not serve `kind:1059` to clients other than the ones tagged in them.
106 106
107It's advisable that users choose relays that conform to these practices. 107It's advisable that users choose relays that conform to these practices.
108 108