DeleteMessagesForMeByTimestampParams

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 ->
// ...
}

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.

Properties

Link copied to clipboard
Link copied to clipboard
private final Long timestamp

Functions

Link copied to clipboard
Link copied to clipboard
public final Long getTimestamp()