Skip to content

Commit

Permalink
Clarifies relays to be used for NIP-28
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorpamplona authored and fiatjaf committed Mar 29, 2024
1 parent 769432e commit 8817801
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions 28.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Client-centric moderation gives client developers discretion over what types of

Create a public chat channel.

In the channel creation `content` field, Client SHOULD include basic channel metadata (`name`, `about`, `picture` as specified in kind 41).
In the channel creation `content` field, Client SHOULD include basic channel metadata (`name`, `about`, `picture` and `relays` as specified in kind 41).

```json
{
"content": "{\"name\": \"Demo Channel\", \"about\": \"A test channel.\", \"picture\": \"https://placekitten.com/200/200\"}",
"content": "{\"name\": \"Demo Channel\", \"about\": \"A test channel.\", \"picture\": \"https://placekitten.com/200/200\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}",
...
}
```
Expand All @@ -46,14 +46,15 @@ Clients SHOULD support basic metadata fields:
- `name` - string - Channel name
- `about` - string - Channel description
- `picture` - string - URL of channel picture
- `relays` - array - List of relays to download and broadcast events to

Clients MAY add additional metadata fields.

Clients SHOULD use [NIP-10](10.md) marked "e" tags to recommend a relay.

```json
{
"content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\"}",
"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>]],
...
}
Expand Down Expand Up @@ -132,12 +133,11 @@ Clients MAY hide event 42s for users other than the user who sent the event 44.
}
```

## NIP-10 relay recommendations
## Relay recommendations

For [NIP-10](10.md) relay recommendations, clients generally SHOULD use the relay URL of the original (oldest) kind 40 event.

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.
Clients SHOULD use the relay URLs of the metadata events.

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.

Motivation
----------
Expand Down

0 comments on commit 8817801

Please sign in to comment.