diff options
| author | Pablo Fernandez <p@f7z.io> | 2023-06-08 22:32:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-08 22:32:17 +0200 |
| commit | 6baacf6fb1badf3ba2480a88519e357b3cbdaaac (patch) | |
| tree | b3d211bc3683b340d678c3574519f327e7b3858e /01.md | |
| parent | 964bc5b5ce946ab66aae945084549f26ffdef70f (diff) | |
| parent | 14a887d43b654f41de5d271e27ef69048f183fb4 (diff) | |
Merge branch 'master' into nip31
Diffstat (limited to '01.md')
| -rw-r--r-- | 01.md | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -99,7 +99,7 @@ This NIP defines no rules for how `NOTICE` messages should be sent or treated. | |||
| 99 | ## Basic Event Kinds | 99 | ## Basic Event Kinds |
| 100 | 100 | ||
| 101 | - `0`: `set_metadata`: the `content` is set to a stringified JSON object `{name: <username>, about: <string>, picture: <url, string>}` describing the user who created the event. A relay may delete past `set_metadata` events once it gets a new one for the same pubkey. | 101 | - `0`: `set_metadata`: the `content` is set to a stringified JSON object `{name: <username>, about: <string>, picture: <url, string>}` describing the user who created the event. A relay may delete past `set_metadata` events once it gets a new one for the same pubkey. |
| 102 | - `1`: `text_note`: the `content` is set to the plaintext content of a note (anything the user wants to say). Markdown links (`[]()` stuff) are not plaintext. | 102 | - `1`: `text_note`: the `content` is set to the plaintext content of a note (anything the user wants to say). Do not use Markdown! Clients should not have to guess how to interpret content like `[]()`. Use different event kinds for parsable content. |
| 103 | - `2`: `recommend_server`: the `content` is set to the URL (e.g., `wss://somerelay.com`) of a relay the event creator wants to recommend to its followers. | 103 | - `2`: `recommend_server`: the `content` is set to the URL (e.g., `wss://somerelay.com`) of a relay the event creator wants to recommend to its followers. |
| 104 | 104 | ||
| 105 | A relay may choose to treat different message kinds differently, and it may or may not choose to have a default way to handle kinds it doesn't know about. | 105 | A relay may choose to treat different message kinds differently, and it may or may not choose to have a default way to handle kinds it doesn't know about. |
| @@ -107,5 +107,6 @@ A relay may choose to treat different message kinds differently, and it may or m | |||
| 107 | ## Other Notes: | 107 | ## Other Notes: |
| 108 | 108 | ||
| 109 | - Clients should not open more than one websocket to each relay. One channel can support an unlimited number of subscriptions, so clients should do that. | 109 | - Clients should not open more than one websocket to each relay. One channel can support an unlimited number of subscriptions, so clients should do that. |
| 110 | - The `tags` array can store a tag identifier as the first element of each subarray, plus arbitrary information afterward (always as strings). This NIP defines `"p"` — meaning "pubkey", which points to a pubkey of someone that is referred to in the event —, and `"e"` — meaning "event", which points to the id of an event this event is quoting, replying to or referring to somehow. See [NIP-10](https://github.com/nostr-protocol/nips/blob/127d5518bfa9a4e4e7510490c0b8d95e342dfa4b/10.md) for a detailed description of "e" and "p" tags. | 110 | - The `tags` array can store a tag identifier as the first element of each subarray, plus arbitrary information afterward (always as strings). This NIP defines `"p"` — meaning "pubkey", which points to a pubkey of someone that is referred to in the event —, and `"e"` — meaning "event", which points to the id of an event this event is quoting, replying to or referring to somehow. See [NIP-10](10.md) for a detailed description of "e" and "p" tags. |
| 111 | - The `<recommended relay URL>` item present on the `"e"` and `"p"` tags is an optional (could be set to `""`) URL of a relay the client could attempt to connect to fetch the tagged event or other events from a tagged profile. It MAY be ignored, but it exists to increase censorship resistance and make the spread of relay addresses more seamless across clients. | 111 | - The `<recommended relay URL>` item present on the `"e"` and `"p"` tags is an optional (could be set to `""`) URL of a relay the client could attempt to connect to fetch the tagged event or other events from a tagged profile. It MAY be ignored, but it exists to increase censorship resistance and make the spread of relay addresses more seamless across clients. |
| 112 | - Clients should use the created_at field to judge the age of a metadata event and completely replace older metadata events with newer metadata events regardless of the order in which they arrive. Clients should not merge any filled fields within older metadata events into empty fields of newer metadata events. | ||