Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/document/android/message_send_receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ private void cancelTimer() {

### 发送自定义类型消息

除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。自定义消息内容为 String 类型的 key-value 格式,你需要自己添加并解析该内容。
除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。

```java
EMMessage customMessage = EMMessage.createSendMessage(EMMessage.Type.CUSTOM);
Expand Down
7 changes: 7 additions & 0 deletions docs/document/android/releasenote.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

<Toc />

## 版本 V4.10.1 Dev 2024-10-11(开发版)

### 优化

1. 使用 ndk-27 重新编译 `cipherdb.so` 库。
2. 底层优化对服务受限时的错误码处理逻辑。

## 版本 V4.10.0 Dev 2024-09-30(开发版)

### 新增特性
Expand Down
2 changes: 1 addition & 1 deletion docs/document/flutter/message_send_receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ void cancelTimer() {

### 发送自定义类型消息

除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。自定义消息内容为 String 类型的 key-value 格式,你需要自己添加并解析该内容。
除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。

```dart
final customMsg = EMMessage.createCustomSendMessage(
Expand Down
2 changes: 1 addition & 1 deletion docs/document/harmonyos/message_send_receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ let msgListener: ChatMessageListener = {

### 发送自定义类型消息

除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。自定义消息内容为 string 类型的 key-value 格式,你需要自己添加并解析该内容。
除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。

```TypeScript
// `event` 为需要传递的自定义消息事件,比如礼物消息,可以设置:
Expand Down
2 changes: 1 addition & 1 deletion docs/document/ios/message_send_receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ EMCmdMessageBody *body = [[EMCmdMessageBody alloc] initWithAction:action];

### 发送自定义类型消息

除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。自定义消息内容为 String 类型的 key-value 格式,你需要自己添加并解析该内容。
除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。

```objectivec
// event 为需要传递的自定义消息事件,比如名片消息,可以设置 "userCard";`ext` 为事件扩展字段,比如可以设置 `uid`,`nickname`,`avatar`。
Expand Down
2 changes: 1 addition & 1 deletion docs/document/react-native/conversation_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

## 实现方法

#### 单向删除服务端会话及其历史消息
### 单向删除服务端会话及其历史消息

你可以调用 `removeConversationFromServer` 方法删除服务器端会话,并选择是否删除服务端和本地的历史消息。会话和消息删除后,当前用户无法从服务器获取该会话和消息。调用该接口不会删除本地会话。该接口不影响其他用户的会话和消息。

Expand Down
2 changes: 1 addition & 1 deletion docs/document/react-native/message_import_insert.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

## 实现方法

#### 批量导入消息到数据库
### 批量导入消息到数据库

你可以调用 `importMessages` 方法通过导入消息列表插入多条消息。典型应用为导入历史消息到本地数据库。

Expand Down
2 changes: 1 addition & 1 deletion docs/document/react-native/message_send_receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ ChatClient.getInstance().chatManager.addMessageListener(listener);

### 发送自定义类型消息

除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。自定义消息内容为 String 类型的 key-value 格式,你需要自己添加并解析该内容。
除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。

```typescript
// 构建自定义消息
Expand Down
4 changes: 2 additions & 2 deletions docs/document/server-side/callback_configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ payload 之外的字段如下表所示:
| `callId` | String | `callId` 为每个回调请求的唯一标识,格式为 “App Key_该撤回事件消息的 ID”。 |
| `eventType` | String | “chat” 上行消息、“chat_offline” 离线消息。 |
| `timestamp` | long | 环信 IM 服务器接收到此消息的 Unix 时间戳,单位为 ms。 |
| `chat_type` | String | “chat” 单聊回调、“groupchat” 群聊回调包含了群组和聊天室的消息回调,默认全选。 |
| `group_id` | String | 当 `chat_type` 为 `groupchat` 有此参数,表示回调消息所在的群组或聊天室。 |
| `chat_type` | String | `recall`,表示消息撤回。 |
| `group_id` | String | 该参数对于群组聊天或聊天室有效,表示回调消息所在的群组或聊天室。 |
| `from` | String | 消息的发送方。 |
| `to` | String | 消息的接收方。 |
| `recall_id` | String | 要撤回的消息 ID。 |
Expand Down
34 changes: 34 additions & 0 deletions docs/document/server-side/message_historical.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,40 @@ curl -X GET -H 'Accept: application/json' -H 'Authorization: Bearer <YourAppToke
]
```

### 合并消息

合并消息的 bodies 包含如下字段:

| 参数 | 类型 | 描述 |
| :------------ | :----- | :----------------------------------------------- |
| `combineLevel` | Int | 合并消息的嵌套层级数。 |
| `file_length` | Int | 合并消息的大小。 |
| `filename` | String | 合并消息的附件名称。 |
| `secret` | String | 合并消息附件的访问密钥。如果 [文件上传](message_download.html#上传文件) 时设置了文件访问限制,则该字段存在。 |
| `subType` | String | 表示消息类型为合并消息。 |
| `summary` | String | 合并消息的概要。 |
| `title` | String | 合并消息的标题。 |
| `url` | String | 合并消息的附件的 URL 地址。你可以访问该 URL 下载该附件。 |

例如,下面示例为源消息包括文本、图片和文件消息的合并消息格式:

```json
"bodies": [
{
"combineLevel": 1,
"file_length": 550,
"filename": "17289718748990036",
"secret": "a_OTmoq6Ee-CygH0PRzcUyFniZDmSsX1ur0j-9RtCj3tK6Gr",
"subType": "sub_combine",
"summary": ":yyuu\n:[图片]\n:[文件]\n",
"title": "聊天记录",
"url": "https://a1-hsb.easemob.com/sandbox-dee1/wdtest/chatfiles/6bf39390-8aba-11ef-a8ae-6f545c50ca23"
}
]
```



## 错误码

如果返回的 HTTP 状态码非 `200`,表示请求失败,可能提示以下错误码:
Expand Down
4 changes: 3 additions & 1 deletion docs/document/server-side/message_recall.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ POST https://{host}/{org_name}/{app_name}/messages/msg_recall
| `from` | String | 否 | 消息撤回方的用户 ID。若不传该参数,默认为 `admin`。 |
| `sync_device`| Bool | 否 | 是否支持单聊消息撤回同步给消息发送方的所有在线设备:<br/> - (默认) `true`:是; <br/> - `false`:否。<Container type="tip" title="提示">当参数 `force` 设置为 `true` 且消息已过期,此时若要将消息撤回同步发送方,则需将 `from` 参数设置为消息发送方。</Container>|
| `force` | Bool | 否 | 是否支持强制撤回消息。<br/> - `true`:是。这种情况下,无论消息是否过期,你都可以撤回。若需撤回已过期的消息,`force` 须设置为 `true`。 <br/> - (默认)`false`:否。这种情况下,你只能在撤回时长内撤销服务端存在的消息。 |
| `recallMessageExtensionInfo` | String | 否 | 消息撤回相关的扩展信息。 |

### HTTP 响应

Expand Down Expand Up @@ -73,7 +74,8 @@ curl -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json
"to": "user2",
"from": "user1",
"chat_type": "chat",
"force": true
"force": true,
"recallMessageExtensionInfo": "{"type": "chat"}"
}'
```

Expand Down
2 changes: 1 addition & 1 deletion docs/document/unity/message_send_receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ void OnCmdMessagesReceived(List<Message> list) {

### 发送自定义类型消息

除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。自定义消息内容为 String 类型的 key-value 格式,你需要自己添加并解析该内容。
除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。

```csharp
//`event` 为字符串类型的自定义事件,比如礼物消息,可以设置:
Expand Down
3 changes: 2 additions & 1 deletion docs/document/windows/message_send_receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ void OnCmdMessagesReceived(List<Message> list) {

### 发送自定义类型消息

除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。自定义消息内容为 String 类型的 key-value 格式,你需要自己添加并解析该内容。
除了几种消息之外,你可以自己定义消息类型,方便业务处理,即首先设置一个消息类型名称,然后可添加多种自定义消息。

```csharp
//`event` 为字符串类型的自定义事件,比如礼物消息,可以设置:
Expand All @@ -494,6 +494,7 @@ SDKClient.Instance.ChatManager.SendMessage(ref msg, new CallBack(
```

### 发送和接收合并消息

为了方便消息互动,即时通讯 IM 自 1.2.0 版本开始支持将多个消息合并在一起进行转发。你可以采取以下步骤进行消息的合并转发:

1. 利用原始消息列表创建一条合并消息。
Expand Down
6 changes: 3 additions & 3 deletions docs/product/message_statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

app 消息分发总数 = app 下行消息总数 + app 离线消息总数

app 下行消息总数:app 用户在线时收到的消息 + app 离线消息总数
app 下行消息总数:app 用户在线时收到的消息数量 + app 用户离线后上线时收到的消息数量

app 离线消息数:用户离线时,服务器端的离线消息总数量。

Expand Down Expand Up @@ -54,7 +54,7 @@ app 离线消息数:用户离线时,服务器端的离线消息总数量。

单聊消息分发总数 = 单聊下行消息总数 + 单聊离线消息总数

单聊下行消息总数:用户在线时收到的消息 + 单聊离线消息总数
单聊下行消息总数:用户在线时收到的消息 + 用户离线后上线时收到的消息数量

单聊离线消息数:用户离线时,服务器端的单聊离线消息总数量。

Expand Down Expand Up @@ -97,7 +97,7 @@ app 离线消息数:用户离线时,服务器端的离线消息总数量。

群聊消息分发总数 = 群聊下行消息总数 + 群聊离线消息总数

群聊下行消息总数:群聊用户在线时收到的消息 + 群聊离线消息总数
群聊下行消息总数:群聊用户在线时收到的消息数量 + 群聊用户离线后上线时收到的消息数量

群聊离线消息数:用户离线时,服务器端的群聊离线消息总数量。

Expand Down