deleteMessages

public abstract void deleteMessages(Array<int> messageIds, RongIMClient.ResultCallback<Boolean> callback)

Deletes messages.

Parameters

messageIds

An array of message IDs to be deleted.

callback

Callback indicating whether the deletion was successful.


public abstract void deleteMessages(ConversationType conversationType, String targetId, RongIMClient.ResultCallback<Boolean> callback)

Deletes all messages in a specific conversation.

This interface deletes all messages in the database for the specified conversation and cleans up the database space to reduce storage usage.

Parameters

conversationType

The type of conversation. Chatrooms are not supported. Refer to Conversation.ConversationType.

targetId

The ID of the conversation. Depending on the conversationType, it could be userId, groupId, or discussionId.

callback

Callback indicating whether the deletion was successful.