invoke

suspend operator fun invoke(messageId: String, conversationId: <Error class: unknown class>): Either<CoreFailure, Unit>

Function that enables resending of failed message to a given conversation with the strategy of fire & forget. This message must have a status of Message.Status.Failed or Message.Status.FailedRemotely.

If it's an asset message, the asset may or may not be already uploaded. The asset will be uploaded if needed.

The resending and possible reuploading of assets are scheduled but not awaited, so returning Either.Right doesn't mean that the message has been sent successfully.

Return

Either.Left in case the message could not be found or has invalid status, Either.Right otherwise. Note that this doesn't imply that send will succeed, it just confirms that resending is the valid action for this message, and it has been started.

Parameters

messageId

the id of the failed message to be resent

conversationId

the id of the conversation where the failed message wants to be resent