clearC2CHistoryMessage
功能介绍
清空单聊本地及云端的消息(不删除会话)
注意:
- 会话内的消息在本地删除的同时,在服务器也会同步删除。
- web不支持该接口
参数详解
| 参数名称 | 参数类型 | 是否必填 | 描述 | 
|---|---|---|---|
| userID | String | 是 | 需要删除的用户id | 
返回值
V2TimCallback
{
    code : int
    desc : String
}
返回值详解
| 名称 | 数值类型 | 描述 | 
|---|---|---|
| code | int | 请求结果错误码 | 
| desc | String | 请求结果描述 | 
代码示例
    //清空单聊本地及云端的消息(不删除会话)
    V2TimCallback clearC2CHistoryMessageRes = await TencentImSDKPlugin
        .v2TIMManager
        .getMessageManager()
        .clearC2CHistoryMessage(userID: "userID"); // 需要清空记录的用户id
    if (clearC2CHistoryMessageRes.code == 0) {
      //清除成功
    }