MigrationDAOImpl

internal class MigrationDAOImpl(migrationQueries: MigrationQueries, messagesQueries: MessagesQueries, unreadEventsQueries: UnreadEventsQueries, conversationsQueries: ConversationsQueries, buttonContentQueries: ButtonContentQueries, selfUserIDEntity: UserIDEntity) : MigrationDAO, MessageInsertExtension

Constructors

Link copied to clipboard
constructor(migrationQueries: MigrationQueries, messagesQueries: MessagesQueries, unreadEventsQueries: UnreadEventsQueries, conversationsQueries: ConversationsQueries, buttonContentQueries: ButtonContentQueries, selfUserIDEntity: UserIDEntity)

Functions

Link copied to clipboard
Link copied to clipboard
open suspend override fun insertConversation(conversationList: List<ConversationEntity>)
Link copied to clipboard
open override fun insertMessageOrIgnore(message: MessageEntity)
Link copied to clipboard
open suspend override fun insertMessages(messageList: List<MessageEntity>)
Link copied to clipboard
open override fun isValidAssetMessageUpdate(message: MessageEntity): Boolean

Returns true if the message is an asset message that is already in the DB and any of its decryption keys are null/empty. This means that this asset message that is in the DB was only a preview message with valid metadata but no valid keys (Web clients send 2 separated messages). Therefore, it still needs to be updated with the valid keys in order to be displayed.

Link copied to clipboard
open override fun updateAssetMessage(message: MessageEntity)