MessageDAO

interface MessageDAO

Inheritors

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract suspend fun deleteAllMessages()
Link copied to clipboard
abstract suspend fun deleteMessage(id: String, conversationsId: QualifiedIDEntity)
Link copied to clipboard
Link copied to clipboard
abstract suspend fun getAllPendingEphemeralMessages(): List<MessageEntity>
Link copied to clipboard
abstract suspend fun getAllPendingMessagesFromUser(userId: UserIDEntity): List<MessageEntity>
Link copied to clipboard
abstract suspend fun getConversationUnreadEventsCount(conversationId: QualifiedIDEntity): Long
Link copied to clipboard
abstract suspend fun getImageMessageAssets(conversationId: QualifiedIDEntity, mimeTypes: Set<String>, limit: Int, offset: Int): List<AssetMessageEntity>
Link copied to clipboard
abstract suspend fun getLastMessagesByConversations(conversationIds: List<QualifiedIDEntity>): Map<QualifiedIDEntity, MessageEntity>
Link copied to clipboard
abstract suspend fun getMessageAssetTransferStatus(messageId: String, conversationId: QualifiedIDEntity): AssetTransferStatusEntity
Link copied to clipboard
abstract suspend fun getMessageById(id: String, conversationId: QualifiedIDEntity): MessageEntity?
abstract suspend fun getMessageIdsThatExpectReadConfirmationWithinDates(conversationId: QualifiedIDEntity, afterDate: <Error class: unknown class>, untilDate: <Error class: unknown class>, visibility: List<MessageEntity.Visibility> = MessageEntity.Visibility.entries): List<String>
Link copied to clipboard
abstract suspend fun getMessagesByConversationAndVisibility(conversationId: QualifiedIDEntity, limit: Int, offset: Int, visibility: List<MessageEntity.Visibility> = MessageEntity.Visibility.entries): <Error class: unknown class><List<MessageEntity>>
Link copied to clipboard
abstract suspend fun getNotificationMessage(maxNumberOfMessagesPerConversation: Int = 10): List<NotificationMessageEntity>
Link copied to clipboard
abstract suspend fun getSearchedConversationMessagePosition(conversationId: QualifiedIDEntity, messageId: String): Int
Link copied to clipboard
abstract suspend fun insertFailedRecipientDelivery(id: String, conversationsId: QualifiedIDEntity, recipientsFailed: List<QualifiedIDEntity>, recipientFailureTypeEntity: RecipientFailureTypeEntity)
Link copied to clipboard
abstract suspend fun insertOrIgnoreMessage(message: MessageEntity, updateConversationModifiedDate: Boolean = false): InsertMessageResult

Inserts the message, or ignores if there's already a message with the same MessageEntity.id and MessageEntity.conversationId. There is only one exception where a second message with the same id will not be ignored, and it is when the first message is an asset preview message. In this case, the second message containing the valid encryption keys will be updating and completing the encryption keys and the visibility of the first one.

Link copied to clipboard
abstract suspend fun insertOrIgnoreMessages(messages: List<MessageEntity>)

Inserts the messages, or ignores messages if there already exists a message with the same MessageEntity.id and MessageEntity.conversationId. There is only one exception where a second message with the same id will not be ignored, and it is when the first message is an asset preview message. In this case, the second message containing the valid encryption keys will be updating and completing the encryption keys and the visibility of the first one.

Link copied to clipboard
abstract suspend fun markMessageAsDeleted(id: String, conversationsId: QualifiedIDEntity)
Link copied to clipboard
abstract suspend fun markMessagesAsDecryptionResolved(conversationId: QualifiedIDEntity, userId: QualifiedIDEntity, clientId: String)
Link copied to clipboard
abstract suspend fun moveMessages(from: ConversationIDEntity, to: ConversationIDEntity)
Link copied to clipboard
abstract suspend fun needsToBeNotified(id: String, conversationId: QualifiedIDEntity): Boolean
Link copied to clipboard
abstract suspend fun observeAssetStatuses(conversationId: QualifiedIDEntity): <Error class: unknown class><List<MessageAssetStatusEntity>>
Link copied to clipboard
abstract suspend fun observeConversationsUnreadEvents(): <Error class: unknown class><List<ConversationUnreadEventEntity>>
Link copied to clipboard
abstract suspend fun observeLastMessages(): <Error class: unknown class><List<MessagePreviewEntity>>
abstract suspend fun observeMessagesByConversationAndVisibilityAfterDate(conversationId: QualifiedIDEntity, date: String, visibility: List<MessageEntity.Visibility> = MessageEntity.Visibility.entries): <Error class: unknown class><List<MessageEntity>>
Link copied to clipboard
abstract suspend fun observeMessageVisibility(messageUuid: String, conversationId: QualifiedIDEntity): <Error class: unknown class><MessageEntity.Visibility?>
Link copied to clipboard
abstract suspend fun observeUnreadEvents(): <Error class: unknown class><Map<ConversationIDEntity, List<UnreadEventEntity>>>
Link copied to clipboard
abstract suspend fun observeUnreadMessageCounter(): <Error class: unknown class><Map<ConversationIDEntity, Int>>
Link copied to clipboard
abstract suspend fun promoteMessageToSentUpdatingServerTime(conversationId: ConversationIDEntity, messageUuid: String, serverDate: <Error class: unknown class>?, millis: Long)
Link copied to clipboard
abstract suspend fun resetAssetTransferStatus()
Link copied to clipboard
abstract suspend fun updateAssetTransferStatus(transferStatus: AssetTransferStatusEntity, id: String, conversationId: QualifiedIDEntity)
Link copied to clipboard
abstract suspend fun updateLegalHoldMessageMembers(conversationId: QualifiedIDEntity, messageId: String, newMembers: List<QualifiedIDEntity>)
Link copied to clipboard
abstract suspend fun updateMessagesStatus(status: MessageEntity.Status, id: List<String>, conversationId: QualifiedIDEntity)
Link copied to clipboard
abstract suspend fun updateMessageStatus(status: MessageEntity.Status, id: String, conversationId: QualifiedIDEntity)
Link copied to clipboard
abstract suspend fun updateSelfDeletionEndDate(conversationId: QualifiedIDEntity, messageId: String, selfDeletionEndDate: <Error class: unknown class>)
Link copied to clipboard
abstract suspend fun updateTextMessageContent(editInstant: <Error class: unknown class>, conversationId: QualifiedIDEntity, currentMessageId: String, newTextContent: MessageEntityContent.Text, newMessageId: String)