createTaskFromMessage

abstract suspend fun createTaskFromMessage(message: IMMessage, conversation: IRainbowConversation, categoryId: String, position: Int? = 0): RainbowResult<Task>

Creates a new Task linked to a given IMMessage and associates it with a category.

This method generates a task based on the provided instant message and associates it with the specified category. Once created, the new Task is returned in the result, and the tasks property will automatically reflect the latest state.

If you want to create a task without linking it to a message, see the createTask method.

Return

A RainbowResult wrapping the created Task on success, or a com.ale.infra.rest.listeners.Failure on error.

Parameters

message

The IMMessage to associate with the task.

conversation

The IRainbowConversation containing the message.

categoryId

The ID of the category where the task will be placed.

position

The position of the task in the list. Defaults to 0.