updateUserReactionForChannelItem

abstract suspend fun updateUserReactionForChannelItem(    channel: Channel,     item: IChannelItem,     reactionType: ReactionType): RainbowResult<IChannelItem>

Update the user's reaction for a specific item in the channel.

This method allows the user to update their reaction (like, doubt, fantastic, applause, etc.) for a specific item (post) within the provided channel. The new reaction will replace the previous one if any.

The available reactions are defined in the ReactionType enum, including:

  • ReactionType.HAPPY

  • ReactionType.DOUBT

  • ReactionType.FANTASTIC

  • ReactionType.APPLAUSE

  • ReactionType.LIKE

  • ReactionType.NONE (Setting this to ReactionType.NONE will have the same effect as calling removeUserReactionForChannelItem).

Return

A RainbowResult containing the updated IChannelItem object with the new reaction on success. In case of failure, it will contain error details.

Parameters

channel

The Channel object where the item is located.

item

The IChannelItem object representing the item (post) for which the reaction is updated.

reactionType

The ReactionType indicating the type of reaction (e.g., like, doubt, fantastic, etc.).