GetMessageAssetUseCaseImpl
internal class GetMessageAssetUseCaseImpl(assetRepository: AssetRepository, messageRepository: MessageRepository, userRepository: UserRepository, updateAssetMessageTransferStatus: UpdateAssetMessageTransferStatusUseCase, audioNormalizedLoudnessScheduler: AudioNormalizedLoudnessScheduler, scope: CoroutineScope, dispatcher: KaliumDispatcher) : GetMessageAssetUseCase
Constructors
Link copied to clipboard
constructor(assetRepository: AssetRepository, messageRepository: MessageRepository, userRepository: UserRepository, updateAssetMessageTransferStatus: UpdateAssetMessageTransferStatusUseCase, audioNormalizedLoudnessScheduler: AudioNormalizedLoudnessScheduler, scope: CoroutineScope, dispatcher: KaliumDispatcher)
Functions
Link copied to clipboard
open suspend operator override fun invoke(conversationId: ConversationId, messageId: String): Deferred<MessageAssetResult>
Function that enables fetching a message asset locally or if it doesn't exist, downloading it from the server, decrypting it and saving it locally. The function returns a Deferred result to the path where the decrypted asset was stored. The caller is responsible for deciding whether to wait for the result or not.