clean History Messages
Deletes messages before the specified timestamp, with the option to also delete messages on the server.
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).
Since
5.0.0
Parameters
The type of conversation.
The ID of the conversation.
The timestamp before 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
.
Whether to delete messages on the server.
The callback for message deletion.