Delete Messages For Me By Timestamp Params
Parameters for deleting messages before a specified timestamp (for the current user).
Used with ai.nexconn.chat.channel.BaseChannel.deleteMessagesForMeByTimestamp and ai.nexconn.chat.channel.CommunitySubChannel.deleteMessagesForMeByTimestamp to delete message history before a given time.
Usage example:
// Delete all messages (including remote)
val params = DeleteMessagesForMeByTimestampParams(
timestamp = 0,
policy = MessageOperationPolicy.LOCAL_REMOTE,
)
channel.deleteMessagesForMeByTimestamp(params) { error ->
if (error == null) {
// Deleted successfully
}
}
// Delete messages older than 24 hours (local only)
val params = DeleteMessagesForMeByTimestampParams(
timestamp = System.currentTimeMillis() - 86400000,
)
channel.deleteMessagesForMeByTimestamp(params) { error ->
// ...
}Content copied to clipboard
Parameters
timestamp
Cutoff timestamp in milliseconds. Messages sent before this time will be deleted. Pass 0 to delete all messages.
policy
Message operation policy. Defaults to local only.
Constructors
Link copied to clipboard
public DeleteMessagesForMeByTimestampParams DeleteMessagesForMeByTimestampParams(Long timestamp, MessageOperationPolicy policy)