createItem

abstract suspend fun createItem(channel: Channel, channelItem: IChannelItem): RainbowResult<String>

Create a new item in the specified channel.

This method allows you to create a new item (post) within the given channel. The item will be persisted and available for other members of the channel to view and interact with.

Return

A RainbowResult containing the unique ID of the created item as a String on success. In case of failure, it will contain error details.

Parameters

channel

The Channel object where the new item will be created.

channelItem

The IChannelItem object that represents the content of the new item.