clean History Messages
Deletes messages before the specified timestamp, with the option to delete messages on the server as well.
This method can clear historical messages from the server, but the historical message cloud storage feature must be enabled first. It clears messages before the specified timestamp in the local database (or server-side historical messages) based on the conversation type and conversation ID. After successful clearance, only historical messages after the specified timestamp can be retrieved from the local database (or server).
Parameters
Specifies the conversation type.
Specifies the conversation ID.
The timestamp before which messages will be deleted. 0 <= recordTime
<= the sentTime of the last message in the current conversation. A value of 0 deletes all
messages, while other values delete messages less than or equal to the recordTime
.
Indicates whether to delete messages on the server.
The callback for the message deletion operation.