MessageInsertExtension

internal interface MessageInsertExtension

Explaining that this is mainly used to share a bit of logic between MessageDAO and MigrationDAO

Inheritors

Functions

Link copied to clipboard
Link copied to clipboard
abstract fun insertMessageOrIgnore(message: MessageEntity)
Link copied to clipboard
abstract 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
abstract fun updateAssetMessage(message: MessageEntity)