diff options
| author | fiatjaf <fiatjaf@gmail.com> | 2024-08-09 08:40:57 -0300 |
|---|---|---|
| committer | fiatjaf <fiatjaf@gmail.com> | 2024-08-09 08:40:57 -0300 |
| commit | d346df0840d206ef6000fd13f51549ba7c5aaa22 (patch) | |
| tree | 29e45458b322eed0d5d731ba302ae4f308e2731b | |
| parent | 428a4779d7c4f4c2ff53815e8958e7cf99d69d26 (diff) | |
NIP-74: addressable chat.addressable-chat
| -rw-r--r-- | 74.md | 29 |
1 files changed, 29 insertions, 0 deletions
| @@ -0,0 +1,29 @@ | |||
| 1 | NIP-74 | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Addressable Chat | ||
| 5 | ---------------- | ||
| 6 | |||
| 7 | `draft` `optional` | ||
| 8 | |||
| 9 | Every time an addressable event (kinds 30000-39999) contains a `"relays"` tag with any number of relay URLs specified in it (`["relays", "wss://myrelay.com", "wss://addressable.chat"]`) clients have the option of toggling a chat box about the topic of that event. | ||
| 10 | |||
| 11 | Chat messages are expected to be read and published from and to the specified relays, which will _somehow_ provide moderation and consistency. | ||
| 12 | |||
| 13 | (Clients can also use different relays other than those specified by the addressable event author, but this would be a power/optional/manual feature until other means of signaling this are invented.) | ||
| 14 | |||
| 15 | ### Chat Message | ||
| 16 | |||
| 17 | Chat messages must have `kind:1311`. Clients MUST include the `a` tag of the activity with a `root` marker. Other Kind-1 tags such as `reply` and `mention` can also be used. An `e` tag containing the specific ID of the current addressable event version being replied to SHOULD also be included. | ||
| 18 | |||
| 19 | ```json | ||
| 20 | { | ||
| 21 | "kind": 1311, | ||
| 22 | "tags": [ | ||
| 23 | ["a", "<addressable-event-kind>:<addressable-author-pubkey>:<d-identifier>", "<optional relay url>", "root"], | ||
| 24 | ["e", "<addressable-event-id>", "<optional relay url>", "root"] | ||
| 25 | ], | ||
| 26 | "content": "hello fans of this article", | ||
| 27 | ... | ||
| 28 | } | ||
| 29 | ``` | ||