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

Matterhorn.State.Common

Synopsis

System interface

runLoggedCommand Source #

Arguments

:: TChan ProgramOutput

The output channel to send the output to

-> String

The program name

-> [String]

Arguments

-> Maybe String

The stdin to send, if any

-> Maybe (MVar ProgramOutput)

Where to put the program output when it is ready

-> IO () 

Posts

installMessagesFromPosts :: Maybe TeamId -> Posts -> MH Messages Source #

Given a collection of posts from the server, save the posts in the global post map. Also convert the posts to Matterhorn's Message type and return them along with the set of all usernames mentioned in the text of the resulting messages.

This also sets the mFlagged field of each message based on whether its post ID is a flagged post according to crFlaggedPosts at the time of this call.

Utilities

postInfoMessage :: Text -> MH () Source #

Add a new ClientMessage representing an error message to the current channel's message list

postErrorMessage' :: Text -> MH () Source #

Add a new ClientMessage representing an error message to the current channel's message list