MessageDataSource

internal class MessageDataSource(selfUserId: <Error class: unknown class>, messageApi: <Error class: unknown class>, mlsMessageApi: <Error class: unknown class>, messageDAO: <Error class: unknown class>, sendMessageFailureMapper: SendMessageFailureMapper = MapperProvider.sendMessageFailureMapper(), messageMapper: MessageMapper = MapperProvider.messageMapper(selfUserId), linkPreviewMapper: LinkPreviewMapper = MapperProvider.linkPreviewMapper(), messageMentionMapper: MessageMentionMapper = MapperProvider.messageMentionMapper(selfUserId), receiptModeMapper: ReceiptModeMapper = MapperProvider.receiptModeMapper(), sendMessagePartialFailureMapper: SendMessagePartialFailureMapper = MapperProvider.sendMessagePartialFailureMapper(), notificationMapper: LocalNotificationMessageMapper = LocalNotificationMessageMapperImpl()) : MessageRepository

Constructors

Link copied to clipboard
internal constructor(selfUserId: <Error class: unknown class>, messageApi: <Error class: unknown class>, mlsMessageApi: <Error class: unknown class>, messageDAO: <Error class: unknown class>, sendMessageFailureMapper: SendMessageFailureMapper = MapperProvider.sendMessageFailureMapper(), messageMapper: MessageMapper = MapperProvider.messageMapper(selfUserId), linkPreviewMapper: LinkPreviewMapper = MapperProvider.linkPreviewMapper(), messageMentionMapper: MessageMentionMapper = MapperProvider.messageMentionMapper(selfUserId), receiptModeMapper: ReceiptModeMapper = MapperProvider.receiptModeMapper(), sendMessagePartialFailureMapper: SendMessagePartialFailureMapper = MapperProvider.sendMessagePartialFailureMapper(), notificationMapper: LocalNotificationMessageMapper = LocalNotificationMessageMapperImpl())

Properties

Link copied to clipboard

Functions

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

Send a Proteus MessageEnvelope.

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

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

Link copied to clipboard
open suspend override fun persistNoClientsToDeliverFailure(conversationId: <Error class: unknown class>, messageUuid: String, usersWithFailedDeliveryList: List<<Error class: unknown class>>): Either<CoreFailure, Unit>

Persist a list of users ids whose clients are missing and could not be retrieved RecipientFailureTypeEntity.NO_CLIENTS_TO_DELIVER

Link copied to clipboard
open suspend override fun persistRecipientsDeliveryFailure(conversationId: <Error class: unknown class>, messageUuid: String, usersWithFailedDeliveryList: List<<Error class: unknown class>>): Either<CoreFailure, Unit>

Persist a list of users ids that failed to receive the message RecipientFailureTypeEntity.MESSAGE_DELIVERY_FAILED

Link copied to clipboard
open suspend override fun persistSystemMessageToAllConversations(message: <Error class: unknown class>): Either<CoreFailure, Unit>
Link copied to clipboard
open suspend override 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
open suspend override fun resetAssetTransferStatus()
Link copied to clipboard
open suspend override 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
open suspend override fun sendMLSMessage(conversationId: <Error class: unknown class>, message: <Error class: unknown class>): Either<CoreFailure, MessageSent>
Link copied to clipboard
open suspend override fun updateAssetMessageTransferStatus(transferStatus: <Error class: unknown class>, conversationId: <Error class: unknown class>, messageUuid: String): Either<CoreFailure, Unit>
Link copied to clipboard
open suspend override fun updateLegalHoldMessageMembers(messageId: String, conversationId: <Error class: unknown class>, newMembers: List<<Error class: unknown class>>): Either<CoreFailure, Unit>
Link copied to clipboard
open suspend override fun updateMessagesStatus(messageStatus: <Error class: unknown class>, conversationId: <Error class: unknown class>, messageUuids: List<String>): <Error class: unknown class>
Link copied to clipboard
open suspend override fun updateMessageStatus(messageStatus: <Error class: unknown class>, conversationId: <Error class: unknown class>, messageUuid: String): <Error class: unknown class>
Link copied to clipboard
open suspend override fun updateTextMessage(conversationId: <Error class: unknown class>, messageContent: <Error class: unknown class>, newMessageId: String, editInstant: <Error class: unknown class>): Either<CoreFailure, Unit>