diff options
| author | Vitor Pamplona <vitor@vitorpamplona.com> | 2024-12-19 10:15:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-19 10:15:46 -0500 |
| commit | f7d97f3f40dc6677e6f996ffff431142ffe05810 (patch) | |
| tree | 2eaa8c8628cc9a4b05811ed3869e21221fd85307 /28.md | |
| parent | d5b77b6d7348061cd0f16adc35e4d02a3a0b7380 (diff) | |
| parent | 561059ff85c171b87a12b8381b724b4afc569a97 (diff) | |
Merge branch 'master' into draft-event
Diffstat (limited to '28.md')
| -rw-r--r-- | 28.md | 28 |
1 files changed, 14 insertions, 14 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 | ||
| @@ -37,7 +37,7 @@ In the channel creation `content` field, Client SHOULD include basic channel met | |||
| 37 | 37 | ||
| 38 | Update a channel's public metadata. | 38 | Update a channel's public metadata. |
| 39 | 39 | ||
| 40 | Clients and relays SHOULD handle kind 41 events similar to kind 33 replaceable events, where the information is used to update the metadata, without modifying the event id for the channel.Only the most recent kind 41 is needed to be stored. | 40 | Kind 41 is used to update the metadata without modifying the event id for the channel. Only the most recent kind 41 per `e` tag value MAY be available. |
| 41 | 41 | ||
| 42 | Clients SHOULD ignore kind 41s from pubkeys other than the kind 40 pubkey. | 42 | Clients SHOULD ignore kind 41s from pubkeys other than the kind 40 pubkey. |
| 43 | 43 | ||
| @@ -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 | ||