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

Matterhorn.State.Editing

Synopsis

Documentation

handleInputSubmission :: Lens' ChatState (EditState Name) -> Text -> MH () Source #

Handle an input submission in the message editor.

This handles the specified input text as if it were user input for the specified channel. This means that if the specified input text contains a command ("/...") then it is executed as normal. Otherwise the text is sent as a message to the specified channel.

However, this function assumes that the message editor is the *source* of the text, so it also takes care of clearing the editor, resetting the edit mode, updating the input history for the specified channel, etc.

data Direction Source #

Constructors

Forwards 
Backwards