invoke

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.

Return

an ScheduleNewAssetMessageResult containing a CoreFailure in case the creation and the local persistence of the original asset message went wrong or the ScheduleNewAssetMessageResult.Success.messageId in case the creation of the preview asset message succeeded. Note that this doesn't imply that the asset upload will succeed, it just confirms that the creation and persistence of the initial worked out.

Parameters

conversationId

the id of the conversation where the asset wants to be sent

assetDataPath

the raw data of the asset to be uploaded to the backend and sent to the given conversation

assetDataSize

the size of the original asset file

assetName

the name of the original asset file

assetMimeType

the type of the asset file