diff options
| author | Jon Staab <jstaab@protonmail.com> | 2023-05-12 05:10:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-12 05:10:45 -0700 |
| commit | e5302f84c74cf42d878a3ed18257a16bc0d3b748 (patch) | |
| tree | b1a3ad9c0317bf7c38f34c500559b66ff7c0a22d /28.md | |
| parent | 1c728516dfdc7508ce27eda222bde78466e3457d (diff) | |
| parent | 4208652dc7a39c63c39559b13c656ec30400fcba (diff) | |
Merge branch 'master' into patch-1
Diffstat (limited to '28.md')
| -rw-r--r-- | 28.md | 17 |
1 files changed, 6 insertions, 11 deletions
| @@ -9,7 +9,7 @@ Public Chat | |||
| 9 | 9 | ||
| 10 | This NIP defines new event kinds for public chat channels, channel messages, and basic client-side moderation. | 10 | This NIP defines new event kinds for public chat channels, channel messages, and basic client-side moderation. |
| 11 | 11 | ||
| 12 | It reserves five event kinds (40-44) for immediate use and five event kinds (45-49) for future use. | 12 | It reserves five event kinds (40-44) for immediate use: |
| 13 | 13 | ||
| 14 | - `40 - channel create` | 14 | - `40 - channel create` |
| 15 | - `41 - channel metadata` | 15 | - `41 - channel metadata` |
| @@ -54,7 +54,7 @@ Clients SHOULD use [NIP-10](10.md) marked "e" tags to recommend a relay. | |||
| 54 | ```json | 54 | ```json |
| 55 | { | 55 | { |
| 56 | "content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\"}", | 56 | "content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\"}", |
| 57 | "tags": [["e", <channel_create_event_id> <relay-url>]], | 57 | "tags": [["e", <channel_create_event_id>, <relay-url>]], |
| 58 | ... | 58 | ... |
| 59 | } | 59 | } |
| 60 | ``` | 60 | ``` |
| @@ -73,7 +73,7 @@ Root message: | |||
| 73 | ```json | 73 | ```json |
| 74 | { | 74 | { |
| 75 | "content": <string>, | 75 | "content": <string>, |
| 76 | "tags": [["e", <kind_40_event_id> <relay-url> "root"]], | 76 | "tags": [["e", <kind_40_event_id>, <relay-url>, "root"]], |
| 77 | ... | 77 | ... |
| 78 | } | 78 | } |
| 79 | ``` | 79 | ``` |
| @@ -84,8 +84,9 @@ Reply to another message: | |||
| 84 | { | 84 | { |
| 85 | "content": <string>, | 85 | "content": <string>, |
| 86 | "tags": [ | 86 | "tags": [ |
| 87 | ["e", <kind_42_event_id> <relay-url> "reply"], | 87 | ["e", <kind_40_event_id>, <relay-url>, "root"], |
| 88 | ["p", <pubkey> <relay-url>], | 88 | ["e", <kind_42_event_id>, <relay-url>, "reply"], |
| 89 | ["p", <pubkey>, <relay-url>], | ||
| 89 | ... | 90 | ... |
| 90 | ], | 91 | ], |
| 91 | ... | 92 | ... |
| @@ -138,12 +139,6 @@ For [NIP-10](10.md) relay recommendations, clients generally SHOULD use the rela | |||
| 138 | 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. | 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. |
| 139 | 140 | ||
| 140 | 141 | ||
| 141 | Future extensibility | ||
| 142 | -------------------- | ||
| 143 | |||
| 144 | We reserve event kinds 45-49 for other events related to chat, to potentially include new types of media (photo/video), moderation, or support of private or group messaging. | ||
| 145 | |||
| 146 | |||
| 147 | Motivation | 142 | Motivation |
| 148 | ---------- | 143 | ---------- |
| 149 | If we're solving censorship-resistant communication for social media, we may as well solve it also for Telegram-style messaging. | 144 | If we're solving censorship-resistant communication for social media, we may as well solve it also for Telegram-style messaging. |