upleb.uk

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

summaryrefslogtreecommitdiff
path: root/29.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 /29.md
parentb4a2561df7325b8624bc5ffad154ec946ade2f1e (diff)
format(all): json formatting
Diffstat (limited to '29.md')
-rw-r--r--29.md28
1 files changed, 14 insertions, 14 deletions
diff --git a/29.md b/29.md
index f867268..6232f8b 100644
--- a/29.md
+++ b/29.md
@@ -42,14 +42,14 @@ Relays should prevent late publication (messages published now with a timestamp
42 42
43This is the basic unit of a "microblog" root text note sent to a group. 43This is the basic unit of a "microblog" root text note sent to a group.
44 44
45```js 45```jsonc
46 "kind": 11, 46 "kind": 11,
47 "content": "hello my friends lovers of pizza", 47 "content": "hello my friends lovers of pizza",
48 "tags": [ 48 "tags": [
49 ["h", "<group-id>"], 49 ["h", "<group-id>"],
50 ["previous", "<event-id-first-chars>", "<event-id-first-chars>", ...] 50 ["previous", "<event-id-first-chars>", "<event-id-first-chars>", /*...*/]
51 ] 51 ]
52 ... 52 // other fields...
53``` 53```
54 54
55- *threaded text reply* (`kind:12`) 55- *threaded text reply* (`kind:12`)
@@ -63,14 +63,14 @@ This is the basic unit of a "microblog" reply note sent to a group. It's the sam
63 63
64This is the basic unit of a _chat message_ sent to a group. 64This is the basic unit of a _chat message_ sent to a group.
65 65
66```js 66```jsonc
67 "kind": 9, 67 "kind": 9,
68 "content": "hello my friends lovers of pizza", 68 "content": "hello my friends lovers of pizza",
69 "tags": [ 69 "tags": [
70 ["h", "<group-id>"], 70 ["h", "<group-id>"],
71 ["previous", "<event-id-first-chars>", "<event-id-first-chars>", ...] 71 ["previous", "<event-id-first-chars>", "<event-id-first-chars>", /*...*/]
72 ] 72 ]
73 ... 73 // other fields...
74``` 74```
75 75
76- *chat message threaded reply* (`kind:10`) 76- *chat message threaded reply* (`kind:10`)
@@ -83,7 +83,7 @@ Similar to `kind:12`, this is the basic unit of a chat message sent to a group.
83 83
84Any user can send one of these events to the relay in order to be automatically or manually added to the group. If the group is `open` the relay will automatically issue a `kind:9000` in response adding this user. Otherwise group admins may choose to query for these requests and act upon them. 84Any user can send one of these events to the relay in order to be automatically or manually added to the group. If the group is `open` the relay will automatically issue a `kind:9000` in response adding this user. Otherwise group admins may choose to query for these requests and act upon them.
85 85
86```js 86```json
87{ 87{
88 "kind": 9021, 88 "kind": 9021,
89 "content": "optional reason", 89 "content": "optional reason",
@@ -97,7 +97,7 @@ Any user can send one of these events to the relay in order to be automatically
97 97
98Any user can send one of these events to the relay in order to be automatically removed from the group. The relay will automatically issue a `kind:9001` in response removing this user. 98Any user can send one of these events to the relay in order to be automatically removed from the group. The relay will automatically issue a `kind:9001` in response removing this user.
99 99
100```js 100```json
101{ 101{
102 "kind": 9022, 102 "kind": 9022,
103 "content": "optional reason", 103 "content": "optional reason",
@@ -111,13 +111,13 @@ Any user can send one of these events to the relay in order to be automatically
111 111
112Clients can send these events to a relay in order to accomplish a moderation action. Relays must check if the pubkey sending the event is capable of performing the given action. The relay may discard the event after taking action or keep it as a moderation log. 112Clients can send these events to a relay in order to accomplish a moderation action. Relays must check if the pubkey sending the event is capable of performing the given action. The relay may discard the event after taking action or keep it as a moderation log.
113 113
114```js 114```json
115{ 115{
116 "kind": 90xx, 116 "kind": 90xx,
117 "content": "optional reason", 117 "content": "optional reason",
118 "tags": [ 118 "tags": [
119 ["h", "<group-id>"], 119 ["h", "<group-id>"],
120 ["previous", ...] 120 ["previous", /*...*/]
121 ] 121 ]
122} 122}
123``` 123```
@@ -142,7 +142,7 @@ This event defines the metadata for the group -- basically how clients should di
142 142
143If the group is forked and hosted in multiple relays, there will be multiple versions of this event in each different relay and so on. 143If the group is forked and hosted in multiple relays, there will be multiple versions of this event in each different relay and so on.
144 144
145```js 145```jsonc
146{ 146{
147 "kind": 39000, 147 "kind": 39000,
148 "content": "", 148 "content": "",
@@ -154,7 +154,7 @@ If the group is forked and hosted in multiple relays, there will be multiple ver
154 ["public"], // or ["private"] 154 ["public"], // or ["private"]
155 ["open"] // or ["closed"] 155 ["open"] // or ["closed"]
156 ] 156 ]
157 ... 157 // other fields...
158} 158}
159``` 159```
160 160
@@ -177,7 +177,7 @@ The list of capabilities, as defined by this NIP, for now, is the following:
177- `edit-group-status` 177- `edit-group-status`
178- `delete-group` 178- `delete-group`
179 179
180```js 180```json
181{ 181{
182 "kind": 39001, 182 "kind": 39001,
183 "content": "list of admins for the pizza lovers group", 183 "content": "list of admins for the pizza lovers group",
@@ -186,7 +186,7 @@ The list of capabilities, as defined by this NIP, for now, is the following:
186 ["p", "<pubkey1-as-hex>", "ceo", "add-user", "edit-metadata", "delete-event", "remove-user"], 186 ["p", "<pubkey1-as-hex>", "ceo", "add-user", "edit-metadata", "delete-event", "remove-user"],
187 ["p", "<pubkey2-as-hex>", "secretary", "add-user", "delete-event"] 187 ["p", "<pubkey2-as-hex>", "secretary", "add-user", "delete-event"]
188 ] 188 ]
189 ... 189 // other fields...
190} 190}
191``` 191```
192 192