Skip to content

Commit 10f0c9b

Browse files
author
haoxiuwen
committed
modify
1 parent 7b873ae commit 10f0c9b

File tree

1 file changed

+30
-14
lines changed

1 file changed

+30
-14
lines changed

docs/document/server-side/callback_configurations.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ app 的响应内容不能超过 1,000 个字符。
4444
| chat:user:file | {“bodies”:{“type”:“file”}} | 单聊中发送文件消息 |
4545
| chat:user:command | {“bodies”:{“type”:“cmd”}} | 单聊中发送命令消息 |
4646
| chat:user:custom | {“bodies”:{“type”:“custom”}} | 单聊中发送自定义消息 |
47-
| chat:user:combine | {“bodies”:{“subType”:“sub_combine”}} | 单聊中发送合并消息 |
47+
| chat:user:combine | {“bodies”:{“type”:“txt”,“subType”:“sub_combine”}} | 单聊中发送合并消息 |
4848
| chat:user:unknown | {“bodies”:{“type”:“unknown”}} | 单聊中发送未知消息 |
4949

5050
#### 回调请求的包体示例
@@ -212,29 +212,45 @@ payload 示例:
212212
| `combineLevel` | Int | 合并消息的嵌套层级数。 |
213213
| `file_length` | Int | 合并消息附件的大小,单位为字节。 |
214214
| `filename` | String | 合并消息的附件名称。 |
215+
| `msg` | String | 合并消息的兼容文本。当支持合并消息的 SDK 向不支持合并消息的低版本 SDK 发送消息时,低版本的 SDK 会将该属性解析为文本消息的消息内容。 |
215216
| `secret` | String | 合并消息附件的访问密钥。如果[文件上传](message_download.html#上传文件) 时设置了文件访问限制,则该字段存在。 |
216217
| `subType` | String | 消息类型。合并消息为 `sub_combine`|
217218
| `summary` | String | 合并消息的概要。 |
218219
| `title` | String | 合并消息的标题。 |
219220
| `url` | String | 合并消息的附件的 URL 地址。你可以访问该 URL 下载该附件。 |
221+
| `ext` | String | 合并消息的扩展信息。 |
222+
| `from` | String | 合并消息的发送方的用户 ID。 |
223+
| `to` | String | 接收方的用户 ID。 |
224+
| `type` | String | 会话类型:<br/> - `chat`: 单聊;<br/> - `groupchat`: 群聊;<br/> - `chatroom`: 聊天室。 |
220225

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

223228
```json
224-
"bodies":
225-
[
226-
{
227-
"combineLevel": 1,
228-
"file_length": 550,
229-
"filename": "17289718748990036",
230-
"secret": "a_OTmoq6Ee-CygH0PRzcUyFniZDmSsX1ur0j-9RtCj3tK6Gr",
231-
"subType": "sub_combine",
232-
"summary": ":yyuu\n:[图片]\n:[文件]\n",
233-
"title": "聊天记录",
234-
"url": "https://XXXX/XXXX/XXXX/chatfiles/6bf39390-8aba-11ef-a8ae-6f545c50ca23"
229+
"payload": {
230+
"bodies": [
231+
{
232+
"combineLevel": 1,
233+
"file_length": 1059,
234+
"filename": "17326799853580001",
235+
"msg": "当前版本过低,无法展示对应内容。",
236+
"secret": "CeycYKx0Ee-I3fU0d5v4X9BduteO1RZNVsePAgkDQ9sxoVJM",
237+
"subType": "sub_combine",
238+
"summary": "wzy1: 你在哪里?\nwzy1: 你在哪里?\nwzy1: 你在哪里?",
239+
"title": "聊天记录",
240+
"type": "txt",
241+
"url": "https://a1-hsb.easemob.com/easemob-demo/testy/chatfiles/09ec7550-ac74-11ef-83ce-4719989e3c82"
242+
}
243+
],
244+
"ext": {
245+
"ease_chat_uikit_user_info": {
246+
"nickname": "公子小白有点黑"
247+
}
248+
},
249+
"from": "user1",
250+
"to": "user2",
251+
"type": "chat"
235252
}
236-
]
237-
```
253+
```
238254

239255
### 发送单聊消息已读回执
240256

0 commit comments

Comments
 (0)