更新时间: 2020-09-07
# 删除指定会话
# 参数说明
输入参数说明
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
conversationType | RCConversationType | 是 | 会话类型,单聊传入 RCConversationType.Private |
targetId | String | 是 | 会话 id,接收方的 userId |
返回参数说明
返回值 | 返回类型 | 说明 |
---|---|---|
success | BOOL | 是否删除成功 |
# 代码示例
RongIMClient.removeConversation(RCConversationType.Private, "1001", (success) { if(success) { print("删除会话成功"); } });
已复制
1
2
3
4
5
2
3
4
5
# 按会话类型删除
# 参数说明
输入参数说明
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
conversationTypeList | List | 是 | 会话类型的数组 需要将 RCConversationType 构建 List |
返回参数说明
返回值 | 返回类型 | 说明 |
---|---|---|
code | int | 具体错误码,0 为成功 |
# 代码示例
List<int> conversations = List(); conversations.add(RCConversationType.Private); RongIMClient.clearConversations(conversations, (code) async { developer.log("clearConversations result:$code",name: pageName); });
已复制
1
2
3
4
5
6
2
3
4
5
6