mirror of
https://github.com/edufeed-org/nips.git
synced 2025-12-09 16:24:32 +00:00
format(all): json formatting
This commit is contained in:
parent
b4a2561df7
commit
e6552476aa
36 changed files with 206 additions and 194 deletions
26
28.md
26
28.md
|
|
@ -25,10 +25,10 @@ Create a public chat channel.
|
|||
|
||||
In the channel creation `content` field, Client SHOULD include basic channel metadata (`name`, `about`, `picture` and `relays` as specified in kind 41).
|
||||
|
||||
```json
|
||||
```jsonc
|
||||
{
|
||||
"content": "{\"name\": \"Demo Channel\", \"about\": \"A test channel.\", \"picture\": \"https://placekitten.com/200/200\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}",
|
||||
...
|
||||
// other fields...
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -52,11 +52,11 @@ Clients MAY add additional metadata fields.
|
|||
|
||||
Clients SHOULD use [NIP-10](10.md) marked "e" tags to recommend a relay.
|
||||
|
||||
```json
|
||||
```jsonc
|
||||
{
|
||||
"content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}",
|
||||
"tags": [["e", <channel_create_event_id>, <relay-url>]],
|
||||
...
|
||||
// other fields...
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -71,26 +71,26 @@ Clients SHOULD append [NIP-10](10.md) "p" tags to replies.
|
|||
|
||||
Root message:
|
||||
|
||||
```json
|
||||
```jsonc
|
||||
{
|
||||
"content": <string>,
|
||||
"tags": [["e", <kind_40_event_id>, <relay-url>, "root"]],
|
||||
...
|
||||
// other fields...
|
||||
}
|
||||
```
|
||||
|
||||
Reply to another message:
|
||||
|
||||
```json
|
||||
```jsonc
|
||||
{
|
||||
"content": <string>,
|
||||
"tags": [
|
||||
["e", <kind_40_event_id>, <relay-url>, "root"],
|
||||
["e", <kind_42_event_id>, <relay-url>, "reply"],
|
||||
["p", <pubkey>, <relay-url>],
|
||||
...
|
||||
// rest of tags...
|
||||
],
|
||||
...
|
||||
// other fields...
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -107,11 +107,11 @@ Clients MAY hide event 42s for other users other than the user who sent the even
|
|||
|
||||
(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.)
|
||||
|
||||
```json
|
||||
```jsonc
|
||||
{
|
||||
"content": "{\"reason\": \"Dick pic\"}",
|
||||
"tags": [["e", <kind_42_event_id>]],
|
||||
...
|
||||
// other fields...
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -125,11 +125,11 @@ Clients SHOULD hide event 42s shown to a given user, if there is an event 44 fro
|
|||
|
||||
Clients MAY hide event 42s for users other than the user who sent the event 44.
|
||||
|
||||
```json
|
||||
```jsonc
|
||||
{
|
||||
"content": "{\"reason\": \"Posting dick pics\"}",
|
||||
"tags": [["p", <pubkey>]],
|
||||
...
|
||||
// other fields...
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue