PersistConversationUseCase

internal interface PersistConversationUseCase

Use case responsible for persisting a single conversation, if it doesn't already exist or if its group state is not yet fully established.

Internally checks for an existing conversation in the local storage. If the conversation is new or not fully established (for MLS-capable types), it delegates to PersistConversationsUseCase to persist it.

Return

Either.Right with true if the conversation was persisted, false otherwise. Returns Either.Left if an error occurred.

Parameters

conversation

The conversation to evaluate and persist.

originatedFromEvent

Whether the call originates from an event (affects MLS group state logic).

Inheritors

Functions

Link copied to clipboard
abstract suspend operator fun invoke(conversation: <Error class: unknown class>, originatedFromEvent: Boolean = false): <Error class: unknown class><<Error class: unknown class>, Boolean>