From 93d8a756d5c40436ab73a5661d40ff59599aafb9 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Tue, 15 Sep 2020 00:58:11 +0400 Subject: [PATCH] Add Requirements section to Basic Chats --- README.md | 3 ++- protocol-spec/basic-chats.md | 36 +++++++++++++++++++++++------------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0c32e88..65ad45b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # Cadmium protocol documentation + **Cadmium** is new instant messaging system which is a refinement of ideas from XMPP and Matrix.org (and a correction of the fundamental errors of the listed protocols). This repo contains documentation about Cadmium protocol and other things. Protocol specification сan be found in `protocol-spec` folder. -Specs currently **unstable** and have status *WIP (Work-In-Progress)*. \ No newline at end of file +Specs currently **unstable** and have status *WIP (Work-In-Progress)*. diff --git a/protocol-spec/basic-chats.md b/protocol-spec/basic-chats.md index a2da6cb..6956659 100644 --- a/protocol-spec/basic-chats.md +++ b/protocol-spec/basic-chats.md @@ -4,30 +4,40 @@ This extension is intended for organizing chats between some entities. -## 2. Message type identifiers +## 2. Requirements + +- Exchanging text messages +- Typing status +- Message reading +- Sharing files/media +- Forwards and replies to messages +- Stickers/GIF +- Message reactions + +## 3. Message type identifiers - `urn:cadmium:chats:message` - regular message - `urn:cadmium:chats:read` - read message system - `urn:cadmium:chats:typing` - typing message system -## 3. Errors +## 4. Errors - Ratelimit system: disabled - Authorization: enabled -### 3.1. Error types +### 4.1. Error types -- `urn:cadmium:chats:private:banned` - Sending messages to user is prohibited, because he banned the sender of current message +- `urn:cadmium:chats:private:banned` - Sending messages to user is prohibited, because he banned the sender of current message - in case if we send the message to user entity. -## 4. Chat message types +## 5. Chat message types - `urn:cadmium:chats:message-types:general` - message with text and optional media - `urn:cadmium:chats:message-types:audio` - audio message - `urn:cadmium:chats:message-types:geolocation` - message with geolocation (coordinates) -## 5. Use cases +## 6. Use cases -### 5.1. Exchanging messages +### 6.1. Exchanging messages 1. Sending message: @@ -94,7 +104,7 @@ This extension is intended for organizing chats between some entities. } ``` -### 5.2. Exchanging media +### 6.2. Exchanging media 1. Upload the media to HTTP Upload service (explanation out of scope of this document) 2. Send message containing the URL of uploaded media: @@ -160,7 +170,7 @@ This extension is intended for organizing chats between some entities. } ``` -### 5.3. Read messages +### 6.3. Read messages 1. Read message @@ -201,7 +211,7 @@ This extension is intended for organizing chats between some entities. } ``` -### 5.3. Typing message +### 6.4. Typing message 1. Typing message @@ -226,13 +236,13 @@ This extension is intended for organizing chats between some entities. } ``` -## 6. Business Rules +## 7. Business Rules -### 6.1. Typing message notification +### 7.1. Typing message notification - Client sends typing notification message every second when he is typing. If there is no notifications about typing more than one second then consider that user is stopped the typing. -## 7. JSON Schema +## 8. JSON Schema ### Send message (`urn:cadmium:chats:message`)