diff options
Diffstat (limited to '28.md')
| -rw-r--r-- | 28.md | 26 |
1 files changed, 13 insertions, 13 deletions
| @@ -25,10 +25,10 @@ Create a public chat channel. | |||
| 25 | 25 | ||
| 26 | In the channel creation `content` field, Client SHOULD include basic channel metadata (`name`, `about`, `picture` and `relays` as specified in kind 41). | 26 | In 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 | ||
| 53 | Clients SHOULD use [NIP-10](10.md) marked "e" tags to recommend a relay. | 53 | Clients 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 | ||
| 72 | Root message: | 72 | Root 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 | ||
| 82 | Reply to another message: | 82 | Reply 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 | ||
| 126 | Clients MAY hide event 42s for users other than the user who sent the event 44. | 126 | Clients 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 | ||