matterhorn-50200.11.0: Terminal client for the Mattermost chat system

Safe HaskellNone
LanguageHaskell2010

Matterhorn.Types.Posts

Synopsis

Documentation

data ClientMessage Source #

A ClientMessage is a message given to us by our client, like help text or an error message.

newClientMessage :: MonadIO m => ClientMessageType -> Text -> m ClientMessage Source #

Create a new ClientMessage value. This is a message generated by this Matterhorn client and not by (or visible to) the Server. These should be visible, but not necessarily integrated into any special position in the output stream (i.e., they should generally appear at the bottom of the messages display, but subsequent messages should follow them), so this is a special place where there is an assumed approximation of equality between local time and server time.

data ClientMessageType Source #

We format ClientMessage values differently depending on their ClientMessageType

Constructors

Informative 
Error 
DateTransition 
NewMessagesTransition 
UnknownGapBefore

a region where the server may have messages before the given timestamp that are not known locally by this client

UnknownGapAfter

a region where server may have messages after the given timestamp that are not known locally by this client

data Attachment Source #

An attachment has a very long URL associated, as well as an actual file URL

Instances
Eq Attachment Source # 
Instance details

Defined in Matterhorn.Types.Posts

Show Attachment Source # 
Instance details

Defined in Matterhorn.Types.Posts

data ClientPostType Source #

A Mattermost Post value can represent either a normal chat message or one of several special events.

data ClientPost Source #

A ClientPost is a temporary internal representation of the Mattermost Post type, with unnecessary information removed and some preprocessing done.

Instances
Show ClientPost Source # 
Instance details

Defined in Matterhorn.Types.Posts

toClientPost :: TeamBaseURL -> Post -> Maybe PostId -> ClientPost Source #

Convert a Mattermost Post to a ClientPost, passing in a ParentId if it has a known one.

unEmote :: ClientPostType -> Text -> Text Source #

Undo the automatic formatting of posts generated by /me-commands

postIsLeave :: Post -> Bool Source #

Find out whether a Post is a user leaving a channel

postIsJoin :: Post -> Bool Source #

Find out whether a Post is a user joining a channel

postIsTopicChange :: Post -> Bool Source #

Find out whether a Post represents a topic change

postIsEmote :: Post -> Bool Source #

Find out whether a Post is from a /me command