cleanHistoryMessages

public abstract void cleanHistoryMessages(ConversationType conversationType, String targetId, String channelId, long recordTime, boolean cleanRemote, IRongCoreCallback.OperationCallback callback)

Deletes messages before the specified timestamp, with the option to delete server-side messages as well.

This method can clear historical messages from the server, but the historical message cloud storage feature must be enabled first.

Clears local database messages (server-side historical messages) before the specified timestamp for a specific conversation based on the conversation type and conversation ID. After successful deletion, only historical messages after this timestamp can be retrieved from the local database (server-side).

Since

5.1.1

Parameters

conversationType

The type of conversation.

targetId

The ID of the conversation.

channelId

The business identifier of the conversation to which the message belongs.

recordTime

The timestamp up to which messages will be cleared. 0 <= recordTime <= sentTime of the last message in the current conversation. 0 clears all messages, other values clear messages less than or equal to recordTime.

cleanRemote

Whether to delete server-side messages.

callback

The callback for message deletion.