diff options
Diffstat (limited to '28.md')
| -rw-r--r-- | 28.md | 16 |
1 files changed, 8 insertions, 8 deletions
| @@ -23,11 +23,11 @@ Client-centric moderation gives client developers discretion over what types of | |||
| 23 | 23 | ||
| 24 | Create a public chat channel. | 24 | Create a public chat channel. |
| 25 | 25 | ||
| 26 | In the channel creation `content` field, Client SHOULD include basic channel metadata (`name`, `about`, `picture` 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 | ```json |
| 29 | { | 29 | { |
| 30 | "content": "{\"name\": \"Demo Channel\", \"about\": \"A test channel.\", \"picture\": \"https://placekitten.com/200/200\"}", | 30 | "content": "{\"name\": \"Demo Channel\", \"about\": \"A test channel.\", \"picture\": \"https://placekitten.com/200/200\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}", |
| 31 | ... | 31 | ... |
| 32 | } | 32 | } |
| 33 | ``` | 33 | ``` |
| @@ -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 | ||
| @@ -46,6 +46,7 @@ Clients SHOULD support basic metadata fields: | |||
| 46 | - `name` - string - Channel name | 46 | - `name` - string - Channel name |
| 47 | - `about` - string - Channel description | 47 | - `about` - string - Channel description |
| 48 | - `picture` - string - URL of channel picture | 48 | - `picture` - string - URL of channel picture |
| 49 | - `relays` - array - List of relays to download and broadcast events to | ||
| 49 | 50 | ||
| 50 | Clients MAY add additional metadata fields. | 51 | Clients MAY add additional metadata fields. |
| 51 | 52 | ||
| @@ -53,7 +54,7 @@ Clients SHOULD use [NIP-10](10.md) marked "e" tags to recommend a relay. | |||
| 53 | 54 | ||
| 54 | ```json | 55 | ```json |
| 55 | { | 56 | { |
| 56 | "content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\"}", | 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 | "tags": [["e", <channel_create_event_id>, <relay-url>]], | 58 | "tags": [["e", <channel_create_event_id>, <relay-url>]], |
| 58 | ... | 59 | ... |
| 59 | } | 60 | } |
| @@ -132,12 +133,11 @@ Clients MAY hide event 42s for users other than the user who sent the event 44. | |||
| 132 | } | 133 | } |
| 133 | ``` | 134 | ``` |
| 134 | 135 | ||
| 135 | ## NIP-10 relay recommendations | 136 | ## Relay recommendations |
| 136 | 137 | ||
| 137 | For [NIP-10](10.md) relay recommendations, clients generally SHOULD use the relay URL of the original (oldest) kind 40 event. | 138 | Clients SHOULD use the relay URLs of the metadata events. |
| 138 | |||
| 139 | Clients MAY recommend any relay URL. For example, if a relay hosting the original kind 40 event for a channel goes offline, clients could instead fetch channel data from a backup relay, or a relay that clients trust more than the original relay. | ||
| 140 | 139 | ||
| 140 | Clients MAY use any relay URL. For example, if a relay hosting the original kind 40 event for a channel goes offline, clients could instead fetch channel data from a backup relay, or a relay that clients trust more than the original relay. | ||
| 141 | 141 | ||
| 142 | Motivation | 142 | Motivation |
| 143 | ---------- | 143 | ---------- |