Package ai.nexconn.chat.params
Class DeleteMessagesForMeByTimestampParams
-
- All Implemented Interfaces:
public final class DeleteMessagesForMeByTimestampParamsParameters 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 -> // ... }
-
-
Field Summary
Fields Modifier and Type Field Description private final Longtimestampprivate final MessageOperationPolicypolicy
-
Constructor Summary
Constructors Constructor Description DeleteMessagesForMeByTimestampParams(Long timestamp, MessageOperationPolicy policy)
-
Method Summary
Modifier and Type Method Description final LonggetTimestamp()final MessageOperationPolicygetPolicy()-
-
Constructor Detail
-
DeleteMessagesForMeByTimestampParams
DeleteMessagesForMeByTimestampParams(Long timestamp, MessageOperationPolicy policy)
- Parameters:
timestamp- Cutoff timestamp in milliseconds.policy- Message operation policy.
-
-
Method Detail
-
getTimestamp
final Long getTimestamp()
-
getPolicy
final MessageOperationPolicy getPolicy()
-
-
-
-