matterhorn-50200.13.0: Terminal client for the Mattermost chat system
Safe HaskellNone
LanguageHaskell2010

Matterhorn.State.Reactions

Synopsis

Documentation

asyncFetchReactionsForPost :: ChannelId -> Post -> MH () Source #

Queue up a fetch for the reactions of the specified post in the specified channel.

addReactions :: ChannelId -> [Reaction] -> MH () Source #

Add the specified reactions returned by the server to the relevant posts in the specified channel. This should only be called in response to a server API request or event. If you want to add reactions to a post, start by calling mmPostReaction. We also invalidate the cache for any rendered message corresponding to the incoming reactions.

removeReaction :: Reaction -> ChannelId -> MH () Source #

Remove the specified reaction from its message in the specified channel. This should only be called in response to a server event instructing us to remove the reaction. If you want to trigger such an event, use updateReaction. We also invalidate the cache for any rendered message corresponding to the removed reaction.

updateReaction :: PostId -> Text -> Bool -> MH () Source #

Set or unset a reaction on a post.

toggleReaction :: PostId -> Text -> Set UserId -> MH () Source #

Toggle a reaction on a post.