MessageRepository

internal interface MessageRepository

Inheritors

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract suspend fun broadcastEnvelope(envelope: <Error class: unknown class>, messageOption: BroadcastMessageOption): Either<CoreFailure, <Error class: unknown class>>

Send a Proteus MessageEnvelope.

Link copied to clipboard
abstract suspend fun deleteMessage(messageUuid: String, conversationId: <Error class: unknown class>): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun getAllAlreadyEndedEphemeralMessages(): Either<CoreFailure, List<<Error class: unknown class>>>
Link copied to clipboard
abstract suspend fun getAllPendingEphemeralMessages(): Either<CoreFailure, List<<Error class: unknown class>>>
Link copied to clipboard
abstract suspend fun getAllPendingMessagesFromUser(senderUserId: <Error class: unknown class>): Either<CoreFailure, List<<Error class: unknown class>>>
Link copied to clipboard
abstract suspend fun getImageAssetMessagesByConversationId(conversationId: <Error class: unknown class>, limit: Int, offset: Int): List<<Error class: unknown class>>
Link copied to clipboard
abstract suspend fun getLastMessagesForConversationIds(conversationIdList: List<<Error class: unknown class>>): Either<StorageFailure, Map<<Error class: unknown class>, <Error class: unknown class>>>
Link copied to clipboard
abstract suspend fun getMessageAssetTransferStatus(messageId: String, conversationId: <Error class: unknown class>): Either<StorageFailure, <Error class: unknown class>>
Link copied to clipboard
abstract suspend fun getMessageById(conversationId: <Error class: unknown class>, messageUuid: String): Either<StorageFailure, <Error class: unknown class>>
Link copied to clipboard
abstract suspend fun getMessagesByConversationIdAndVisibility(conversationId: <Error class: unknown class>, limit: Int, offset: Int, visibility: List<<Error class: unknown class>> = Message.Visibility.entries): <Error class: unknown class><List<<Error class: unknown class>>>
abstract suspend fun getMessagesByConversationIdAndVisibilityAfterDate(conversationId: <Error class: unknown class>, date: String, visibility: List<<Error class: unknown class>> = Message.Visibility.entries): <Error class: unknown class><List<<Error class: unknown class>>>
Link copied to clipboard
abstract suspend fun getNotificationMessage(messageSizePerConversation: Int = 10): Either<CoreFailure, List<<Error class: unknown class>>>
abstract suspend fun getPendingConfirmationMessagesByConversationAfterDate(conversationId: <Error class: unknown class>, afterDateTime: <Error class: unknown class>, untilDateTime: <Error class: unknown class>, visibility: List<<Error class: unknown class>> = Message.Visibility.entries): Either<CoreFailure, List<String>>
abstract suspend fun getReceiptModeFromGroupConversationByQualifiedID(conversationId: <Error class: unknown class>): Either<CoreFailure, <Error class: unknown class>?>
Link copied to clipboard
abstract suspend fun getSearchedConversationMessagePosition(conversationId: <Error class: unknown class>, messageId: String): Either<StorageFailure, Int>
Link copied to clipboard
abstract suspend fun markMessageAsDeleted(messageUuid: String, conversationId: <Error class: unknown class>): Either<StorageFailure, Unit>
Link copied to clipboard
abstract suspend fun markMessagesAsDecryptionResolved(conversationId: <Error class: unknown class>, userId: <Error class: unknown class>, clientId: <Error class: unknown class>): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun markSelfDeletionEndDate(conversationId: <Error class: unknown class>, messageUuid: String, deletionEndDate: <Error class: unknown class>): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun moveMessagesToAnotherConversation(originalConversation: <Error class: unknown class>, targetConversation: <Error class: unknown class>): Either<StorageFailure, Unit>
Link copied to clipboard
abstract suspend fun observeAssetStatuses(conversationId: <Error class: unknown class>): <Error class: unknown class><Either<StorageFailure, List<<Error class: unknown class>>>>
Link copied to clipboard
abstract suspend fun observeMessageVisibility(messageUuid: String, conversationId: <Error class: unknown class>): <Error class: unknown class><Either<StorageFailure, <Error class: unknown class>>>
Link copied to clipboard
abstract suspend fun persistMessage(message: <Error class: unknown class>, updateConversationModifiedDate: Boolean = false): Either<CoreFailure, <Error class: unknown class>>

this fun should never be used directly, use PersistMessageUseCase() instead

Link copied to clipboard
abstract suspend fun persistNoClientsToDeliverFailure(conversationId: <Error class: unknown class>, messageUuid: String, usersWithFailedDeliveryList: List<<Error class: unknown class>>): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun persistRecipientsDeliveryFailure(conversationId: <Error class: unknown class>, messageUuid: String, usersWithFailedDeliveryList: List<<Error class: unknown class>>): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun persistSystemMessageToAllConversations(message: <Error class: unknown class>): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun promoteMessageToSentUpdatingServerTime(conversationId: <Error class: unknown class>, messageUuid: String, serverDate: <Error class: unknown class>?, millis: Long): Either<CoreFailure, Unit>

updates the message status to MessageEntity.Status.SENT and optionally sets the message creation date to serverDate if not null, also marks other pending messages and adds millis to their date

Link copied to clipboard
abstract suspend fun resetAssetTransferStatus()
Link copied to clipboard
abstract suspend fun sendEnvelope(conversationId: <Error class: unknown class>, envelope: <Error class: unknown class>, messageTarget: MessageTarget): Either<CoreFailure, MessageSent>

Send a Proteus MessageEnvelope to the given conversationId.

Link copied to clipboard
abstract suspend fun sendMLSMessage(conversationId: <Error class: unknown class>, message: <Error class: unknown class>): Either<CoreFailure, MessageSent>
Link copied to clipboard
abstract suspend fun updateAssetMessageTransferStatus(transferStatus: <Error class: unknown class>, conversationId: <Error class: unknown class>, messageUuid: String): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun updateLegalHoldMessageMembers(messageId: String, conversationId: <Error class: unknown class>, newMembers: List<<Error class: unknown class>>): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun updateMessagesStatus(messageStatus: <Error class: unknown class>, conversationId: <Error class: unknown class>, messageUuids: List<String>): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun updateMessageStatus(messageStatus: <Error class: unknown class>, conversationId: <Error class: unknown class>, messageUuid: String): Either<CoreFailure, Unit>
Link copied to clipboard
abstract suspend fun updateTextMessage(conversationId: <Error class: unknown class>, messageContent: <Error class: unknown class>, newMessageId: String, editInstant: <Error class: unknown class>): Either<CoreFailure, Unit>