BufferedMLSMessageRecoveryTracker

internal class BufferedMLSMessageRecoveryTracker(recoveryThreshold: Duration = DEFAULT_RECOVERY_THRESHOLD)

Tracks prolonged CoreCrypto MLS message buffering so the client can initiate stale epoch recovery.

Buffered event timestamps are tracked per conversation and subconversation. Recovery is requested when their timestamp span exceeds recoveryThreshold, allowing short-lived out-of-order delivery to resolve without intervention. Once triggered, recovery keeps being requested for every further buffered message until clear is called, so a failed recovery attempt is retried with the next buffered message. Tracking is kept in memory for the lifetime of the current user session and does not survive process or session recreation.

Constructors

Link copied to clipboard
constructor(recoveryThreshold: Duration = DEFAULT_RECOVERY_THRESHOLD)

Functions

Link copied to clipboard
suspend fun clear(conversationId: ConversationId, subConversationId: SubconversationId?)
Link copied to clipboard
suspend fun observeBufferedMessage(conversationId: ConversationId, subConversationId: SubconversationId?, timestamp: Instant): Boolean