invoke

abstract suspend operator fun invoke(asset: AssetUploadParams): 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

asset

the parameters required to create and upload the new asset