mirror of
https://github.com/cadmium-im/cadmium-docs-legacy.git
synced 2024-11-09 12:11:03 +00:00
Remove unneccessary info in typing message feature
This commit is contained in:
parent
aea7e57a95
commit
9dfea26a7e
@ -197,7 +197,7 @@ This extension is intended for organizing private chat between two users.
|
||||
}
|
||||
```
|
||||
|
||||
### 5.3. Typing messages
|
||||
### 5.3. Typing message
|
||||
|
||||
1. Typing message
|
||||
|
||||
@ -206,9 +206,7 @@ This extension is intended for organizing private chat between two users.
|
||||
"id": "abcd",
|
||||
"type": "urn:cadmium:chats:private:typing",
|
||||
"to": ["@user1@cadmium.org"],
|
||||
"payload": {
|
||||
"status": "typing",
|
||||
}
|
||||
"payload": {}
|
||||
}
|
||||
```
|
||||
|
||||
@ -220,42 +218,15 @@ This extension is intended for organizing private chat between two users.
|
||||
"type": "urn:cadmium:chats:private:read",
|
||||
"from": "@user2@cadmium.im",
|
||||
"ok": true,
|
||||
"payload": {
|
||||
"status": "typing"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Pause typing message (e.g. when user stops abruptly typing message or just sent the message)
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "abcd",
|
||||
"type": "urn:cadmium:chats:private:typing",
|
||||
"to": ["@user1@cadmium.org"],
|
||||
"payload": {
|
||||
"status": "paused",
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
4. Receive notification pausing typing message on other side:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "defg",
|
||||
"type": "urn:cadmium:chats:private:read",
|
||||
"from": "@user2@cadmium.im",
|
||||
"ok": true,
|
||||
"payload": {
|
||||
"status": "paused"
|
||||
}
|
||||
"payload": {}
|
||||
}
|
||||
```
|
||||
|
||||
## 6. Business Rules
|
||||
|
||||
None.
|
||||
### 6.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
|
||||
|
||||
@ -345,31 +316,4 @@ None.
|
||||
interface ReceiveReadMessageNotifPayload {
|
||||
messageID: string; // the message id of read message
|
||||
}
|
||||
```
|
||||
|
||||
### Typing message (`urn:cadmium:chats:private:typing`)
|
||||
|
||||
**Request**:
|
||||
|
||||
```typescript
|
||||
interface TypingMessagePayload {
|
||||
status: TypingStatus; // the status of the typing
|
||||
}
|
||||
|
||||
enum TypingStatus {
|
||||
typing,
|
||||
paused
|
||||
}
|
||||
```
|
||||
|
||||
**Response**:
|
||||
|
||||
None.
|
||||
|
||||
### Receive read message notification (`urn:cadmium:chats:private:typing`)
|
||||
|
||||
```typescript
|
||||
interface TypingMessageNotifPayload {
|
||||
status: TypingStatus; // the status of the typing
|
||||
}
|
||||
```
|
||||
```
|
Loading…
Reference in New Issue
Block a user