ScheduleNewAssetMessageUseCaseImpl
internal class ScheduleNewAssetMessageUseCaseImpl(persistMessage: PersistMessageUseCase, updateAssetMessageTransferStatus: UpdateAssetMessageTransferStatusUseCase, currentClientIdProvider: CurrentClientIdProvider, assetDataSource: AssetRepository, userId: <Error class: unknown class>, slowSyncRepository: SlowSyncRepository, messageSender: MessageSender, messageSendFailureHandler: MessageSendFailureHandler, messageRepository: MessageRepository, userPropertyRepository: UserPropertyRepository, selfDeleteTimer: ObserveSelfDeletionTimerSettingsForConversationUseCase, scope: <Error class: unknown class>, observeFileSharingStatus: ObserveFileSharingStatusUseCase, validateAssetFileUseCase: ValidateAssetFileTypeUseCase, dispatcher: <Error class: unknown class>) : ScheduleNewAssetMessageUseCase
Constructors
Link copied to clipboard
constructor(persistMessage: PersistMessageUseCase, updateAssetMessageTransferStatus: UpdateAssetMessageTransferStatusUseCase, currentClientIdProvider: CurrentClientIdProvider, assetDataSource: AssetRepository, userId: <Error class: unknown class>, slowSyncRepository: SlowSyncRepository, messageSender: MessageSender, messageSendFailureHandler: MessageSendFailureHandler, messageRepository: MessageRepository, userPropertyRepository: UserPropertyRepository, selfDeleteTimer: ObserveSelfDeletionTimerSettingsForConversationUseCase, scope: <Error class: unknown class>, observeFileSharingStatus: ObserveFileSharingStatusUseCase, validateAssetFileUseCase: ValidateAssetFileTypeUseCase, dispatcher: <Error class: unknown class>)
Functions
Link copied to clipboard
open suspend operator override fun invoke(conversationId: <Error class: unknown class>, assetDataPath: <Error class: unknown class>, assetDataSize: Long, assetName: String, assetMimeType: String, assetWidth: Int?, assetHeight: Int?, audioLengthInMs: Long): ScheduleNewAssetMessageResult
Function that enables sending an asset message to a given conversation with the strategy of fire & forget. This message is persisted locally and the asset upload is scheduled but not awaited, so returning a ScheduleNewAssetMessageResult.Success doesn't mean that the asset upload succeeded, but instead that the creation and persistence of the initial asset message succeeded.