Skip to main content

删除本地和云端的己方历史消息,自己的多设备会同步删除,接口调用成功后不影响对方或群里的其他成员继续查看消息,支持批量删除同一会话的多条消息。

参数说明

名称类型描述版本
conversationConversation会话标识1.0.0
clientMsgNoListList<Long>本端消息唯一编号列表1.0.0
callbackIMessageManager.ISimpleCallback结果回调1.0.0

示例代码

Conversation conversation = new Conversation(Conversation.ConversationType.GROUP, "groupId1");
List<Long> clientMsgNoList = new ArrayList<>();
clientMsgNoList.add(111L);
clientMsgNoList.add(222L);
clientMsgNoList.add(333L);
JIM.getInstance().getMessageManager().deleteMessagesByClientMsgNoList(conversation, clientMsgNoList, new IMessageManager.ISimpleCallback() {
@Override
public void onSuccess() {

}

@Override
public void onError(int errorCode) {

}
});