upleb.uk

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

summaryrefslogtreecommitdiff
path: root/28.md
diff options
context:
space:
mode:
authorkehiy <kehiiiiya@gmail.com>2024-09-03 20:41:31 +0330
committerkehiy <kehiiiiya@gmail.com>2024-09-03 20:41:31 +0330
commite6552476aa2e5ca7256be572a9aa226ec8a022ee (patch)
tree46f14902bd2bfb85e5f3369ece456c46b697b1a2 /28.md
parentb4a2561df7325b8624bc5ffad154ec946ade2f1e (diff)
format(all): json formatting
Diffstat (limited to '28.md')
-rw-r--r--28.md26
1 files changed, 13 insertions, 13 deletions
diff --git a/28.md b/28.md
index 1632088..73c76b2 100644
--- a/28.md
+++ b/28.md
@@ -25,10 +25,10 @@ Create a public chat channel.
25 25
26In the channel creation `content` field, Client SHOULD include basic channel metadata (`name`, `about`, `picture` and `relays` as specified in kind 41). 26In the channel creation `content` field, Client SHOULD include basic channel metadata (`name`, `about`, `picture` and `relays` as specified in kind 41).
27 27
28```json 28```jsonc
29{ 29{
30 "content": "{\"name\": \"Demo Channel\", \"about\": \"A test channel.\", \"picture\": \"https://placekitten.com/200/200\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}", 30 "content": "{\"name\": \"Demo Channel\", \"about\": \"A test channel.\", \"picture\": \"https://placekitten.com/200/200\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}",
31 ... 31 // other fields...
32} 32}
33``` 33```
34 34
@@ -52,11 +52,11 @@ Clients MAY add additional metadata fields.
52 52
53Clients SHOULD use [NIP-10](10.md) marked "e" tags to recommend a relay. 53Clients SHOULD use [NIP-10](10.md) marked "e" tags to recommend a relay.
54 54
55```json 55```jsonc
56{ 56{
57 "content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}", 57 "content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}",
58 "tags": [["e", <channel_create_event_id>, <relay-url>]], 58 "tags": [["e", <channel_create_event_id>, <relay-url>]],
59 ... 59 // other fields...
60} 60}
61``` 61```
62 62
@@ -71,26 +71,26 @@ Clients SHOULD append [NIP-10](10.md) "p" tags to replies.
71 71
72Root message: 72Root message:
73 73
74```json 74```jsonc
75{ 75{
76 "content": <string>, 76 "content": <string>,
77 "tags": [["e", <kind_40_event_id>, <relay-url>, "root"]], 77 "tags": [["e", <kind_40_event_id>, <relay-url>, "root"]],
78 ... 78 // other fields...
79} 79}
80``` 80```
81 81
82Reply to another message: 82Reply to another message:
83 83
84```json 84```jsonc
85{ 85{
86 "content": <string>, 86 "content": <string>,
87 "tags": [ 87 "tags": [
88 ["e", <kind_40_event_id>, <relay-url>, "root"], 88 ["e", <kind_40_event_id>, <relay-url>, "root"],
89 ["e", <kind_42_event_id>, <relay-url>, "reply"], 89 ["e", <kind_42_event_id>, <relay-url>, "reply"],
90 ["p", <pubkey>, <relay-url>], 90 ["p", <pubkey>, <relay-url>],
91 ... 91 // rest of tags...
92 ], 92 ],
93 ... 93 // other fields...
94} 94}
95``` 95```
96 96
@@ -107,11 +107,11 @@ Clients MAY hide event 42s for other users other than the user who sent the even
107 107
108(For example, if three users 'hide' an event giving a reason that includes the word 'pornography', a Nostr client that is an iOS app may choose to hide that message for all iOS clients.) 108(For example, if three users 'hide' an event giving a reason that includes the word 'pornography', a Nostr client that is an iOS app may choose to hide that message for all iOS clients.)
109 109
110```json 110```jsonc
111{ 111{
112 "content": "{\"reason\": \"Dick pic\"}", 112 "content": "{\"reason\": \"Dick pic\"}",
113 "tags": [["e", <kind_42_event_id>]], 113 "tags": [["e", <kind_42_event_id>]],
114 ... 114 // other fields...
115} 115}
116``` 116```
117 117
@@ -125,11 +125,11 @@ Clients SHOULD hide event 42s shown to a given user, if there is an event 44 fro
125 125
126Clients MAY hide event 42s for users other than the user who sent the event 44. 126Clients MAY hide event 42s for users other than the user who sent the event 44.
127 127
128```json 128```jsonc
129{ 129{
130 "content": "{\"reason\": \"Posting dick pics\"}", 130 "content": "{\"reason\": \"Posting dick pics\"}",
131 "tags": [["p", <pubkey>]], 131 "tags": [["p", <pubkey>]],
132 ... 132 // other fields...
133} 133}
134``` 134```
135 135