Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ConnectionStatus
- data HelpTopic = HelpTopic {}
- data ProgramOutput = ProgramOutput {}
- data MHEvent
- data InternalEvent
- data StartupStateInfo = StartupStateInfo {}
- data MHError
- = GenericError Text
- | NoSuchChannel Text
- | NoSuchUser Text
- | AmbiguousName Text
- | ServerError MattermostError
- | ClipboardError Text
- | ConfigOptionMissing Text
- | ProgramExecutionFailed Text Text
- | NoSuchScript Text
- | NoSuchHelpTopic Text
- | AttachmentException SomeException
- | BadAttachmentPath Text
- | AsyncErrEvent SomeException
- data CPUUsagePolicy
- class (Show a, Eq a, Ord a) => SemEq a where
- handleEventWith :: [Event -> MH Bool] -> Event -> MH Bool
- getServerBaseUrl :: TeamId -> MH TeamBaseURL
- serverBaseUrl :: ChatState -> TeamId -> TeamBaseURL
- data ConnectionInfo = ConnectionInfo {
- _ciHostname :: Text
- _ciPort :: Int
- _ciUrlPath :: Text
- _ciUsername :: Text
- _ciOTPToken :: Maybe Text
- _ciPassword :: Text
- _ciAccessToken :: Text
- _ciType :: ConnectionType
- data SidebarUpdate
- data PendingChannelChange
- = ChangeByChannelId TeamId ChannelId (Maybe (MH ()))
- | ChangeByUserId UserId
- data ViewMessageWindowTab
- clearChannelUnreadStatus :: ChannelId -> MH ()
- data ChannelListSorting
- data ThreadOrientation
- data ChannelListOrientation
- channelListEntryUserId :: ChannelListEntry -> Maybe UserId
- userIdsFromZipper :: Zipper ChannelListGroup ChannelListEntry -> [UserId]
- entryIsDMEntry :: ChannelListEntry -> Bool
- ciHostname :: Lens' ConnectionInfo Text
- ciPort :: Lens' ConnectionInfo Int
- ciUrlPath :: Lens' ConnectionInfo Text
- ciUsername :: Lens' ConnectionInfo Text
- ciOTPToken :: Lens' ConnectionInfo (Maybe Text)
- ciPassword :: Lens' ConnectionInfo Text
- ciType :: Lens' ConnectionInfo ConnectionType
- ciAccessToken :: Lens' ConnectionInfo Text
- data ChannelTopicDialogState = ChannelTopicDialogState {}
- channelTopicDialogEditor :: Lens' ChannelTopicDialogState (Editor Text Name)
- channelTopicDialogFocus :: Lens' ChannelTopicDialogState (FocusRing Name)
- resultToWidget :: Result n -> Widget n
- data Config = Config {
- configUser :: Maybe Text
- configHost :: Maybe Text
- configTeam :: Maybe Text
- configPort :: Int
- configUrlPath :: Maybe Text
- configPass :: Maybe PasswordSource
- configToken :: Maybe TokenSource
- configTimeFormat :: Maybe Text
- configDateFormat :: Maybe Text
- configTheme :: Maybe Text
- configThemeCustomizationFile :: Maybe Text
- configSmartBacktick :: Bool
- configSmartEditing :: Bool
- configURLOpenCommand :: Maybe Text
- configURLOpenCommandInteractive :: Bool
- configActivityNotifyCommand :: Maybe Text
- configActivityNotifyVersion :: NotificationVersion
- configActivityBell :: Bool
- configTruncateVerbatimBlocks :: Maybe Int
- configShowMessageTimestamps :: Bool
- configShowBackground :: BackgroundInfo
- configShowMessagePreview :: Bool
- configShowChannelList :: Bool
- configShowExpandedChannelTopics :: Bool
- configEnableAspell :: Bool
- configAspellDictionary :: Maybe Text
- configUnsafeUseHTTP :: Bool
- configValidateServerCertificate :: Bool
- configChannelListWidth :: Int
- configLogMaxBufferSize :: Int
- configShowOlderEdits :: Bool
- configChannelListSorting :: ChannelListSorting
- configShowTypingIndicator :: Bool
- configSendTypingNotifications :: Bool
- configAbsPath :: Maybe FilePath
- configUserKeys :: KeyConfig
- configHyperlinkingMode :: Bool
- configSyntaxDirs :: [FilePath]
- configDirectChannelExpirationDays :: Int
- configCpuUsagePolicy :: CPUUsagePolicy
- configDefaultAttachmentPath :: Maybe FilePath
- configChannelListOrientation :: ChannelListOrientation
- configThreadOrientation :: ThreadOrientation
- configMouseMode :: Bool
- configShowLastOpenThread :: Bool
- configUserL :: Lens' Config (Maybe Text)
- configHostL :: Lens' Config (Maybe Text)
- configTeamL :: Lens' Config (Maybe Text)
- configPortL :: Lens' Config Int
- configUrlPathL :: Lens' Config (Maybe Text)
- configPassL :: Lens' Config (Maybe PasswordSource)
- configTokenL :: Lens' Config (Maybe TokenSource)
- configTimeFormatL :: Lens' Config (Maybe Text)
- configDateFormatL :: Lens' Config (Maybe Text)
- configThemeL :: Lens' Config (Maybe Text)
- configThemeCustomizationFileL :: Lens' Config (Maybe Text)
- configSmartBacktickL :: Lens' Config Bool
- configSmartEditingL :: Lens' Config Bool
- configURLOpenCommandL :: Lens' Config (Maybe Text)
- configURLOpenCommandInteractiveL :: Lens' Config Bool
- configActivityNotifyCommandL :: Lens' Config (Maybe Text)
- configActivityNotifyVersionL :: Lens' Config NotificationVersion
- configActivityBellL :: Lens' Config Bool
- configTruncateVerbatimBlocksL :: Lens' Config (Maybe Int)
- configChannelListSortingL :: Lens' Config ChannelListSorting
- configShowMessageTimestampsL :: Lens' Config Bool
- configShowBackgroundL :: Lens' Config BackgroundInfo
- configShowMessagePreviewL :: Lens' Config Bool
- configShowChannelListL :: Lens' Config Bool
- configShowExpandedChannelTopicsL :: Lens' Config Bool
- configEnableAspellL :: Lens' Config Bool
- configAspellDictionaryL :: Lens' Config (Maybe Text)
- configUnsafeUseHTTPL :: Lens' Config Bool
- configValidateServerCertificateL :: Lens' Config Bool
- configChannelListWidthL :: Lens' Config Int
- configLogMaxBufferSizeL :: Lens' Config Int
- configShowOlderEditsL :: Lens' Config Bool
- configShowTypingIndicatorL :: Lens' Config Bool
- configSendTypingNotificationsL :: Lens' Config Bool
- configAbsPathL :: Lens' Config (Maybe FilePath)
- configUserKeysL :: Lens' Config KeyConfig
- configHyperlinkingModeL :: Lens' Config Bool
- configSyntaxDirsL :: Lens' Config [FilePath]
- configDirectChannelExpirationDaysL :: Lens' Config Int
- configCpuUsagePolicyL :: Lens' Config CPUUsagePolicy
- configDefaultAttachmentPathL :: Lens' Config (Maybe FilePath)
- configChannelListOrientationL :: Lens' Config ChannelListOrientation
- configThreadOrientationL :: Lens' Config ThreadOrientation
- configMouseModeL :: Lens' Config Bool
- configShowLastOpenThreadL :: Lens' Config Bool
- data NotificationVersion
- data PasswordSource
- data TokenSource
- data MatchType
- data Mode
- data ChannelSelectPattern
- data PostListContents
- data AuthenticationException
- data BackgroundInfo
- type RequestChan = TChan (IO (Maybe (MH ())))
- data UserFetch
- writeBChan :: MonadIO m => BChan MHEvent -> MHEvent -> m ()
- data InternalTheme = InternalTheme {}
- attrNameToConfig :: AttrName -> Text
- sortTeams :: [Team] -> [Team]
- matchesTeam :: Text -> Team -> Bool
- mkTeamZipper :: HashMap TeamId TeamState -> Zipper () TeamId
- mkTeamZipperFromIds :: [TeamId] -> Zipper () TeamId
- teamZipperIds :: Zipper () TeamId -> [TeamId]
- mkChannelZipperList :: ChannelListSorting -> UTCTime -> Config -> TeamId -> Maybe ClientConfig -> UserPreferences -> HashMap TeamId (Set ChannelListGroupLabel) -> ClientChannels -> Users -> [(ChannelListGroup, [ChannelListEntry])]
- data ChannelListGroup = ChannelListGroup {}
- nonDMChannelListGroupUnread :: ChannelListGroup -> Int
- type ThreadInterface = MessageInterface Name PostId
- type ChannelMessageInterface = MessageInterface Name ()
- threadInterface :: HasCallStack => TeamId -> Traversal' ChatState ThreadInterface
- unsafeThreadInterface :: HasCallStack => TeamId -> Lens' ChatState ThreadInterface
- maybeThreadInterface :: TeamId -> Lens' ChatState (Maybe ThreadInterface)
- threadInterfaceEmpty :: TeamId -> MH Bool
- threadInterfaceDeleteWhere :: TeamId -> ChannelId -> (Message -> Bool) -> MH ()
- modifyThreadMessages :: TeamId -> ChannelId -> (Messages -> Messages) -> MH ()
- modifyEachThreadMessage :: TeamId -> ChannelId -> (Message -> Message) -> MH ()
- trimChannelSigil :: Text -> Text
- data ChannelSelectState = ChannelSelectState {}
- channelSelectMatches :: Lens' ChannelSelectState (Zipper ChannelListGroup ChannelSelectMatch)
- channelSelectInput :: Lens' ChannelSelectState (Editor Text Name)
- emptyChannelSelectState :: TeamId -> ChannelSelectState
- data TeamState = TeamState {
- _tsFocus :: Zipper ChannelListGroup ChannelListEntry
- _tsTeam :: Team
- _tsRecentChannel :: Maybe ChannelId
- _tsReturnChannel :: Maybe ChannelId
- _tsModeStack :: NonemptyStack Mode
- _tsChannelSelectState :: ChannelSelectState
- _tsPendingChannelChange :: Maybe PendingChannelChange
- _tsViewedMessage :: Maybe (Message, TabbedWindow ChatState MH Name ViewMessageWindowTab)
- _tsPostListWindow :: PostListWindowState
- _tsUserListWindow :: ListWindowState UserInfo UserSearchScope
- _tsChannelListWindow :: ListWindowState Channel ChannelSearchScope
- _tsNotifyPrefs :: Maybe (Form ChannelNotifyProps MHEvent Name)
- _tsChannelTopicDialog :: ChannelTopicDialogState
- _tsReactionEmojiListWindow :: ListWindowState (Bool, Text) ()
- _tsThemeListWindow :: ListWindowState InternalTheme ()
- _tsChannelListSorting :: ChannelListSorting
- _tsThreadInterface :: Maybe ThreadInterface
- _tsMessageInterfaceFocus :: MessageInterfaceFocus
- tsFocus :: Lens' TeamState (Zipper ChannelListGroup ChannelListEntry)
- tsPendingChannelChange :: Lens' TeamState (Maybe PendingChannelChange)
- tsRecentChannel :: Lens' TeamState (Maybe ChannelId)
- tsReturnChannel :: Lens' TeamState (Maybe ChannelId)
- tsTeam :: Lens' TeamState Team
- tsChannelSelectState :: Lens' TeamState ChannelSelectState
- tsViewedMessage :: Lens' TeamState (Maybe (Message, TabbedWindow ChatState MH Name ViewMessageWindowTab))
- tsPostListWindow :: Lens' TeamState PostListWindowState
- tsUserListWindow :: Lens' TeamState (ListWindowState UserInfo UserSearchScope)
- tsChannelListWindow :: Lens' TeamState (ListWindowState Channel ChannelSearchScope)
- tsNotifyPrefs :: Lens' TeamState (Maybe (Form ChannelNotifyProps MHEvent Name))
- tsChannelTopicDialog :: Lens' TeamState ChannelTopicDialogState
- tsReactionEmojiListWindow :: Lens' TeamState (ListWindowState (Bool, Text) ())
- tsThemeListWindow :: Lens' TeamState (ListWindowState InternalTheme ())
- tsChannelListSorting :: Lens' TeamState ChannelListSorting
- tsThreadInterface :: Lens' TeamState (Maybe ThreadInterface)
- tsMessageInterfaceFocus :: Lens' TeamState MessageInterfaceFocus
- teamMode :: TeamState -> Mode
- teamModes :: TeamState -> [Mode]
- getTeamMode :: TeamId -> MH Mode
- data MessageInterfaceFocus
- messageInterfaceFocusNext :: TeamState -> TeamState
- messageInterfaceFocusPrev :: TeamState -> TeamState
- channelEditor :: ChannelId -> Lens' ChatState (EditState Name)
- channelMessageSelect :: ChannelId -> Lens' ChatState MessageSelectState
- data ChatState
- newState :: StartupStateInfo -> ChatState
- withCurrentChannel :: TeamId -> (ChannelId -> ClientChannel -> MH ()) -> MH ()
- withCurrentChannel' :: TeamId -> (ChannelId -> ClientChannel -> MH (Maybe a)) -> MH (Maybe a)
- withCurrentTeam :: (TeamId -> MH ()) -> MH ()
- csTeamZipper :: Lens' ChatState (Zipper () TeamId)
- csTeams :: Lens' ChatState (HashMap TeamId TeamState)
- csTeam :: TeamId -> Lens' ChatState TeamState
- csChannelListOrientation :: Lens' ChatState ChannelListOrientation
- csResources :: Lens' ChatState ChatResources
- csLastMouseDownEvent :: Lens' ChatState (Maybe (BrickEvent Name MHEvent))
- csGlobalEditState :: Lens' ChatState GlobalEditState
- csVerbatimTruncateSetting :: Lens' ChatState (Maybe Int)
- csCurrentChannelId :: TeamId -> SimpleGetter ChatState (Maybe ChannelId)
- csCurrentTeamId :: SimpleGetter ChatState (Maybe TeamId)
- csPostMap :: Lens' ChatState (HashMap PostId Message)
- csUsers :: Lens' ChatState Users
- csHiddenChannelGroups :: Lens' ChatState (HashMap TeamId (Set ChannelListGroupLabel))
- csConnectionStatus :: Lens' ChatState ConnectionStatus
- csWorkerIsBusy :: Lens' ChatState (Maybe (Maybe Int))
- csChannel :: ChannelId -> Traversal' ChatState ClientChannel
- csChannelMessages :: ChannelId -> Traversal' ChatState Messages
- csChannelMessageInterface :: ChannelId -> Lens' ChatState ChannelMessageInterface
- maybeChannelMessageInterface :: ChannelId -> Traversal' ChatState ChannelMessageInterface
- csChannels :: Lens' ChatState ClientChannels
- csClientConfig :: Lens' ChatState (Maybe ClientConfig)
- csInputHistory :: Lens' ChatState InputHistory
- csMe :: Lens' ChatState User
- timeZone :: Lens' ChatState TimeZoneSeries
- whenMode :: TeamId -> Mode -> MH () -> MH ()
- pushMode :: TeamId -> Mode -> MH ()
- pushMode' :: TeamId -> Mode -> ChatState -> ChatState
- popMode :: TeamId -> MH ()
- replaceMode :: TeamId -> Mode -> MH ()
- data GlobalEditState = GlobalEditState {}
- emptyGlobalEditState :: GlobalEditState
- gedYankBuffer :: Lens' GlobalEditState Text
- data PostListWindowState = PostListWindowState {}
- postListSelected :: Lens' PostListWindowState (Maybe PostId)
- postListPosts :: Lens' PostListWindowState Messages
- data UserSearchScope
- data ChannelSearchScope = AllChannels
- data ListWindowState a b = ListWindowState {
- _listWindowSearchResults :: List Name a
- _listWindowSearchInput :: Editor Text Name
- _listWindowSearchScope :: b
- _listWindowSearching :: Bool
- _listWindowEnterHandler :: a -> MH Bool
- _listWindowNewList :: Vector a -> List Name a
- _listWindowFetchResults :: b -> Session -> Text -> IO (Vector a)
- _listWindowRecordCount :: Maybe Int
- listWindowSearchResults :: forall a b. Lens' (ListWindowState a b) (List Name a)
- listWindowSearchInput :: forall a b. Lens' (ListWindowState a b) (Editor Text Name)
- listWindowSearchScope :: forall a b. Lens' (ListWindowState a b) b
- listWindowSearching :: forall a b. Lens' (ListWindowState a b) Bool
- listWindowEnterHandler :: forall a b. Lens' (ListWindowState a b) (a -> MH Bool)
- listWindowNewList :: forall a b. Lens' (ListWindowState a b) (Vector a -> List Name a)
- listWindowFetchResults :: forall a b. Lens' (ListWindowState a b) (b -> Session -> Text -> IO (Vector a))
- listWindowRecordCount :: forall a b. Lens' (ListWindowState a b) (Maybe Int)
- getUsers :: MH Users
- data ChatResources = ChatResources {
- _crSession :: Session
- _crWebsocketThreadId :: Maybe ThreadId
- _crConn :: ConnectionData
- _crRequestQueue :: RequestChan
- _crEventQueue :: BChan MHEvent
- _crSubprocessLog :: TChan ProgramOutput
- _crWebsocketActionChan :: TChan WebsocketAction
- _crTheme :: AttrMap
- _crStatusUpdateChan :: TChan [UserId]
- _crConfiguration :: Config
- _crFlaggedPosts :: Set PostId
- _crUserPreferences :: UserPreferences
- _crSyntaxMap :: SyntaxMap
- _crLogManager :: LogManager
- _crEmoji :: EmojiCollection
- _crSpellChecker :: Maybe Aspell
- crUserPreferences :: Lens' ChatResources UserPreferences
- crEventQueue :: Lens' ChatResources (BChan MHEvent)
- crTheme :: Lens' ChatResources AttrMap
- crStatusUpdateChan :: Lens' ChatResources (TChan [UserId])
- crSubprocessLog :: Lens' ChatResources (TChan ProgramOutput)
- crWebsocketActionChan :: Lens' ChatResources (TChan WebsocketAction)
- crWebsocketThreadId :: Lens' ChatResources (Maybe ThreadId)
- crRequestQueue :: Lens' ChatResources RequestChan
- crFlaggedPosts :: Lens' ChatResources (Set PostId)
- crConn :: Lens' ChatResources ConnectionData
- crConfiguration :: Lens' ChatResources Config
- crSyntaxMap :: Lens' ChatResources SyntaxMap
- crLogManager :: Lens' ChatResources LogManager
- crSpellChecker :: Lens' ChatResources (Maybe Aspell)
- crEmoji :: Lens' ChatResources EmojiCollection
- getSession :: MH Session
- getResourceSession :: ChatResources -> Session
- specialUserMentions :: [Text]
- applyTeamOrder :: [TeamId] -> MH ()
- refreshTeamZipper :: MH ()
- data UserPreferences = UserPreferences Bool (Seq FlaggedPost) (HashMap ChannelId Bool) (HashMap UserId Bool) (HashMap ChannelId Bool) (Maybe TeammateNameDisplayMode) (Maybe [TeamId])
- userPrefShowJoinLeave :: Lens' UserPreferences Bool
- userPrefFlaggedPostList :: Lens' UserPreferences (Seq FlaggedPost)
- userPrefGroupChannelPrefs :: Lens' UserPreferences (HashMap ChannelId Bool)
- userPrefDirectChannelPrefs :: Lens' UserPreferences (HashMap UserId Bool)
- userPrefTeammateNameDisplayMode :: Lens' UserPreferences (Maybe TeammateNameDisplayMode)
- userPrefTeamOrder :: Lens' UserPreferences (Maybe [TeamId])
- userPrefFavoriteChannelPrefs :: Lens' UserPreferences (HashMap ChannelId Bool)
- dmChannelShowPreference :: UserPreferences -> UserId -> Maybe Bool
- groupChannelShowPreference :: UserPreferences -> ChannelId -> Maybe Bool
- favoriteChannelPreference :: UserPreferences -> ChannelId -> Maybe Bool
- defaultUserPreferences :: UserPreferences
- setUserPreferences :: Seq Preference -> UserPreferences -> UserPreferences
- data WebsocketAction = UserTyping UTCTime ChannelId (Maybe PostId)
- data Cmd = forall a. Cmd {}
- commandName :: Cmd -> Text
- data CmdArgs :: Type -> Type where
- data MH a
- runMHEvent :: ChatState -> MH () -> EventM Name (Next ChatState)
- scheduleUserFetches :: [UserFetch] -> MH ()
- scheduleUserStatusFetches :: [UserId] -> MH ()
- getScheduledUserFetches :: MH [UserFetch]
- getScheduledUserStatusFetches :: MH (Maybe [UserId])
- mh :: EventM Name a -> MH a
- generateUUID :: MH UUID
- generateUUID_IO :: IO UUID
- mhSuspendAndResume :: (ChatState -> IO ChatState) -> MH ()
- mhHandleEventLensed :: Lens' ChatState b -> (e -> b -> EventM Name b) -> e -> MH ()
- mhHandleEventLensed' :: Lens' ChatState b -> (b -> EventM Name b) -> MH ()
- mhContinueWithoutRedraw :: MH ()
- gets :: MonadState s m => (s -> a) -> m a
- mhError :: MHError -> MH ()
- mhLog :: LogCategory -> Text -> MH ()
- mhGetIOLogger :: MH (LogCategory -> Text -> IO ())
- ioLogWithManager :: LogManager -> Maybe LogContext -> LogCategory -> Text -> IO ()
- data LogContext = LogContext {}
- withLogContext :: (Maybe LogContext -> Maybe LogContext) -> MH a -> MH a
- withLogContextChannelId :: ChannelId -> MH a -> MH a
- getLogContext :: MH (Maybe LogContext)
- data LogMessage = LogMessage {}
- data LogCommand
- data LogCategory
- data LogManager = LogManager {}
- startLoggingToFile :: LogManager -> FilePath -> IO ()
- stopLoggingToFile :: LogManager -> IO ()
- requestLogSnapshot :: LogManager -> FilePath -> IO ()
- requestLogDestination :: LogManager -> IO ()
- sendLogMessage :: LogManager -> LogMessage -> IO ()
- requestQuit :: MH ()
- getMessageForPostId :: ChatState -> PostId -> Maybe Message
- getParentMessage :: ChatState -> Message -> Maybe Message
- getReplyRootMessage :: Message -> MH Message
- withChannel :: ChannelId -> (ClientChannel -> MH ()) -> MH ()
- withChannelOrDefault :: ChannelId -> a -> (ClientChannel -> MH a) -> MH a
- userList :: ChatState -> [UserInfo]
- resetAutocomplete :: Traversal' ChatState (EditState n) -> MH ()
- isMine :: ChatState -> Message -> Bool
- setUserStatus :: UserId -> Text -> MH ()
- myUser :: ChatState -> User
- myUsername :: ChatState -> Text
- myUserId :: ChatState -> UserId
- usernameForUserId :: UserId -> ChatState -> Maybe Text
- userByUsername :: Text -> ChatState -> Maybe UserInfo
- userByNickname :: Text -> ChatState -> Maybe UserInfo
- channelIdByChannelName :: TeamId -> Text -> ChatState -> Maybe ChannelId
- channelIdByUsername :: Text -> ChatState -> Maybe ChannelId
- userById :: UserId -> ChatState -> Maybe UserInfo
- allUserIds :: ChatState -> [UserId]
- addNewUser :: UserInfo -> MH ()
- useNickname :: ChatState -> Bool
- useNickname' :: Maybe ClientConfig -> UserPreferences -> Bool
- displayNameForUserId :: UserId -> ChatState -> Maybe Text
- displayNameForUser :: UserInfo -> Maybe ClientConfig -> UserPreferences -> Text
- raiseInternalEvent :: InternalEvent -> MH ()
- getNewMessageCutoff :: ChannelId -> ChatState -> Maybe NewMessageIndicator
- getEditedMessageCutoff :: ChannelId -> ChatState -> Maybe ServerTime
- data HighlightSet = HighlightSet {
- hUserSet :: Set Text
- hChannelSet :: Set Text
- hSyntaxMap :: SyntaxMap
- type UserSet = Set Text
- type ChannelSet = Set Text
- getHighlightSet :: ChatState -> TeamId -> HighlightSet
- emptyHSet :: HighlightSet
- moveLeft :: Eq a => a -> [a] -> [a]
- moveRight :: Eq a => a -> [a] -> [a]
- module Matterhorn.Types.Core
- module Matterhorn.Types.Channels
- module Matterhorn.Types.EditState
- module Matterhorn.Types.Messages
- module Matterhorn.Types.MessageInterface
- module Matterhorn.Types.TabbedWindow
- module Matterhorn.Types.Posts
- module Matterhorn.Types.Users
Documentation
data ConnectionStatus Source #
We're either connected or we're not.
Instances
Eq ConnectionStatus Source # | |
Defined in Matterhorn.Types (==) :: ConnectionStatus -> ConnectionStatus -> Bool # (/=) :: ConnectionStatus -> ConnectionStatus -> Bool # |
Help topics
data ProgramOutput Source #
ProgramOutput | |
|
This represents events that we handle in the main application loop.
WSEvent WebsocketEvent | For events that arise from the websocket |
WSActionResponse WebsocketActionResponse | For responses to websocket actions |
RespEvent (MH ()) | For the result values of async IO operations |
RefreshWebsocketEvent | Tell our main loop to refresh the websocket connection |
WebsocketParseError String | We failed to parse an incoming websocket event |
WebsocketDisconnect | The websocket connection went down. |
WebsocketConnect | The websocket connection came up. |
BGIdle | background worker is idle |
BGBusy (Maybe Int) | background worker is busy (with n requests) |
RateLimitExceeded Int | A request initially failed due to a rate limit but will be retried if possible. The argument is the number of seconds in which the retry will be attempted. |
RateLimitSettingsMissing | A request denied by a rate limit could not be retried because the response contained no rate limit metadata |
RequestDropped | A request was reattempted due to a rate limit and was rate limited again |
IEvent InternalEvent | MH-internal events |
data InternalEvent Source #
Internal application events.
DisplayError MHError | Some kind of application error occurred |
LoggingStarted FilePath | |
LoggingStopped FilePath | |
LogStartFailed FilePath String | |
LogDestination (Maybe FilePath) | |
LogSnapshotSucceeded FilePath | |
LogSnapshotFailed FilePath String | Logging events from the logging thread |
data StartupStateInfo Source #
Startup state information that is constructed prior to building a ChatState.
Application errors.
GenericError Text | A generic error message constructor |
NoSuchChannel Text | The specified channel does not exist |
NoSuchUser Text | The specified user does not exist |
AmbiguousName Text | The specified name matches both a user and a channel |
ServerError MattermostError | A Mattermost server error occurred |
ClipboardError Text | A problem occurred trying to deal with yanking or the system clipboard |
ConfigOptionMissing Text | A missing config option is required to perform an operation |
ProgramExecutionFailed Text Text | Args: program name, path to log file. A problem occurred when running the program. |
NoSuchScript Text | The specified script was not found |
NoSuchHelpTopic Text | The specified help topic was not found |
AttachmentException SomeException | IO operations for attaching a file threw an exception |
BadAttachmentPath Text | The specified file is either a directory or doesn't exist |
AsyncErrEvent SomeException | For errors that arise in the course of async IO operations |
data CPUUsagePolicy Source #
The policy for CPU usage.
The idea is that Matterhorn can benefit from using multiple CPUs, but the exact number is application-determined. We expose this policy setting to the user in the configuration.
SingleCPU | Constrain the application to use one CPU. |
MultipleCPUs | Permit the usage of multiple CPUs (the exact number is determined by the application). |
Instances
Eq CPUUsagePolicy Source # | |
Defined in Matterhorn.Types (==) :: CPUUsagePolicy -> CPUUsagePolicy -> Bool # (/=) :: CPUUsagePolicy -> CPUUsagePolicy -> Bool # | |
Show CPUUsagePolicy Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> CPUUsagePolicy -> ShowS # show :: CPUUsagePolicy -> String # showList :: [CPUUsagePolicy] -> ShowS # |
class (Show a, Eq a, Ord a) => SemEq a where Source #
Types that provide a "semantically equal" operation. Two values may be semantically equal even if they are not equal according to Eq if, for example, they are equal on the basis of some fields that are more pertinent than others.
handleEventWith :: [Event -> MH Bool] -> Event -> MH Bool Source #
Given a list of event handlers and an event, try to handle the event with the handlers in the specified order. If a handler returns False (indicating it did not handle the event), try the next handler until either a handler returns True or all handlers are tried. Returns True if any handler handled the event or False otherwise.
getServerBaseUrl :: TeamId -> MH TeamBaseURL Source #
serverBaseUrl :: ChatState -> TeamId -> TeamBaseURL Source #
data ConnectionInfo Source #
Our ConnectionInfo
contains exactly as much information as is
necessary to start a connection with a Mattermost server. This is
built up during interactive authentication and then is used to log
in.
If the access token field is non-empty, that value is used and the username and password values are ignored.
ConnectionInfo | |
|
data SidebarUpdate Source #
Instances
Eq SidebarUpdate Source # | |
Defined in Matterhorn.Types (==) :: SidebarUpdate -> SidebarUpdate -> Bool # (/=) :: SidebarUpdate -> SidebarUpdate -> Bool # | |
Show SidebarUpdate Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> SidebarUpdate -> ShowS # show :: SidebarUpdate -> String # showList :: [SidebarUpdate] -> ShowS # |
data PendingChannelChange Source #
data ViewMessageWindowTab Source #
Handles for the View Message window's tabs.
VMTabMessage | The message tab. |
VMTabReactions | The reactions tab. |
Instances
Eq ViewMessageWindowTab Source # | |
Defined in Matterhorn.Types (==) :: ViewMessageWindowTab -> ViewMessageWindowTab -> Bool # (/=) :: ViewMessageWindowTab -> ViewMessageWindowTab -> Bool # | |
Show ViewMessageWindowTab Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> ViewMessageWindowTab -> ShowS # show :: ViewMessageWindowTab -> String # showList :: [ViewMessageWindowTab] -> ShowS # |
clearChannelUnreadStatus :: ChannelId -> MH () Source #
data ChannelListSorting Source #
Instances
Eq ChannelListSorting Source # | |
Defined in Matterhorn.Types (==) :: ChannelListSorting -> ChannelListSorting -> Bool # (/=) :: ChannelListSorting -> ChannelListSorting -> Bool # | |
Ord ChannelListSorting Source # | |
Defined in Matterhorn.Types compare :: ChannelListSorting -> ChannelListSorting -> Ordering # (<) :: ChannelListSorting -> ChannelListSorting -> Bool # (<=) :: ChannelListSorting -> ChannelListSorting -> Bool # (>) :: ChannelListSorting -> ChannelListSorting -> Bool # (>=) :: ChannelListSorting -> ChannelListSorting -> Bool # max :: ChannelListSorting -> ChannelListSorting -> ChannelListSorting # min :: ChannelListSorting -> ChannelListSorting -> ChannelListSorting # | |
Show ChannelListSorting Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> ChannelListSorting -> ShowS # show :: ChannelListSorting -> String # showList :: [ChannelListSorting] -> ShowS # |
data ThreadOrientation Source #
ThreadBelow | Show the thread below the channel message area. |
ThreadAbove | Show the thread above the channel message area. |
ThreadLeft | Show the thread to the left of the channel message area. |
ThreadRight | Show the thread to the right of the channel message area. |
Instances
Eq ThreadOrientation Source # | |
Defined in Matterhorn.Types (==) :: ThreadOrientation -> ThreadOrientation -> Bool # (/=) :: ThreadOrientation -> ThreadOrientation -> Bool # | |
Show ThreadOrientation Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> ThreadOrientation -> ShowS # show :: ThreadOrientation -> String # showList :: [ThreadOrientation] -> ShowS # |
data ChannelListOrientation Source #
ChannelListLeft | Show the channel list to the left of the message area. |
ChannelListRight | Show the channel list to the right of the message area. |
Instances
Eq ChannelListOrientation Source # | |
Defined in Matterhorn.Types | |
Show ChannelListOrientation Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> ChannelListOrientation -> ShowS # show :: ChannelListOrientation -> String # showList :: [ChannelListOrientation] -> ShowS # |
data ChannelTopicDialogState Source #
The state of the channel topic editor window.
ChannelTopicDialogState | |
|
resultToWidget :: Result n -> Widget n Source #
This is how we represent the user's configuration. Most fields correspond to configuration file settings (see Config.hs) but some are for internal book-keeping purposes only.
Config | |
|
data NotificationVersion Source #
A notification version for the external notifier
Instances
Eq NotificationVersion Source # | |
Defined in Matterhorn.Types (==) :: NotificationVersion -> NotificationVersion -> Bool # (/=) :: NotificationVersion -> NotificationVersion -> Bool # | |
Read NotificationVersion Source # | |
Defined in Matterhorn.Types | |
Show NotificationVersion Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> NotificationVersion -> ShowS # show :: NotificationVersion -> String # showList :: [NotificationVersion] -> ShowS # |
data PasswordSource Source #
A user password is either given to us directly, or a command which we execute to find the password.
Instances
Eq PasswordSource Source # | |
Defined in Matterhorn.Types (==) :: PasswordSource -> PasswordSource -> Bool # (/=) :: PasswordSource -> PasswordSource -> Bool # | |
Read PasswordSource Source # | |
Defined in Matterhorn.Types readsPrec :: Int -> ReadS PasswordSource # readList :: ReadS [PasswordSource] # | |
Show PasswordSource Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> PasswordSource -> ShowS # show :: PasswordSource -> String # showList :: [PasswordSource] -> ShowS # |
data TokenSource Source #
An access token source.
Instances
Eq TokenSource Source # | |
Defined in Matterhorn.Types (==) :: TokenSource -> TokenSource -> Bool # (/=) :: TokenSource -> TokenSource -> Bool # | |
Read TokenSource Source # | |
Defined in Matterhorn.Types readsPrec :: Int -> ReadS TokenSource # readList :: ReadS [TokenSource] # readPrec :: ReadPrec TokenSource # readListPrec :: ReadPrec [TokenSource] # | |
Show TokenSource Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> TokenSource -> ShowS # show :: TokenSource -> String # showList :: [TokenSource] -> ShowS # |
The Mode
represents the current dominant UI activity
data ChannelSelectPattern Source #
Instances
Eq ChannelSelectPattern Source # | |
Defined in Matterhorn.Types (==) :: ChannelSelectPattern -> ChannelSelectPattern -> Bool # (/=) :: ChannelSelectPattern -> ChannelSelectPattern -> Bool # | |
Show ChannelSelectPattern Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> ChannelSelectPattern -> ShowS # show :: ChannelSelectPattern -> String # showList :: [ChannelSelectPattern] -> ShowS # |
data PostListContents Source #
Mode type for the current contents of the post list window
Instances
Eq PostListContents Source # | |
Defined in Matterhorn.Types (==) :: PostListContents -> PostListContents -> Bool # (/=) :: PostListContents -> PostListContents -> Bool # | |
Show PostListContents Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> PostListContents -> ShowS # show :: PostListContents -> String # showList :: [PostListContents] -> ShowS # |
data AuthenticationException Source #
The sum type of exceptions we expect to encounter on authentication
failure. We encode them explicitly here so that we can print them in
a more user-friendly manner than just show
.
ConnectError HostCannotConnect | |
ResolveError HostNotResolved | |
AuthIOError IOError | |
LoginError LoginFailureException | |
MattermostServerError MattermostError | |
OtherAuthError SomeException |
Instances
Show AuthenticationException Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> AuthenticationException -> ShowS # show :: AuthenticationException -> String # showList :: [AuthenticationException] -> ShowS # |
data BackgroundInfo Source #
The state of the UI diagnostic indicator for the async worker thread.
Disabled | Disable (do not show) the indicator. |
Active | Show the indicator when the thread is working. |
ActiveCount | Show the indicator when the thread is working, but include the thread's work queue length. |
Instances
Eq BackgroundInfo Source # | |
Defined in Matterhorn.Types (==) :: BackgroundInfo -> BackgroundInfo -> Bool # (/=) :: BackgroundInfo -> BackgroundInfo -> Bool # | |
Show BackgroundInfo Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> BackgroundInfo -> ShowS # show :: BackgroundInfo -> String # showList :: [BackgroundInfo] -> ShowS # |
type RequestChan = TChan (IO (Maybe (MH ()))) Source #
A RequestChan
is a queue of operations we have to perform in the
background to avoid blocking on the main loop
A user fetching strategy.
UserFetchById UserId | Fetch the user with the specified ID. |
UserFetchByUsername Text | Fetch the user with the specified username. |
UserFetchByNickname Text | Fetch the user with the specified nickname. |
data InternalTheme Source #
attrNameToConfig :: AttrName -> Text Source #
mkChannelZipperList :: ChannelListSorting -> UTCTime -> Config -> TeamId -> Maybe ClientConfig -> UserPreferences -> HashMap TeamId (Set ChannelListGroupLabel) -> ClientChannels -> Users -> [(ChannelListGroup, [ChannelListEntry])] Source #
data ChannelListGroup Source #
The type of channel list group headings. Integer arguments indicate total number of channels in the group that have unread activity.
Instances
Eq ChannelListGroup Source # | |
Defined in Matterhorn.Types (==) :: ChannelListGroup -> ChannelListGroup -> Bool # (/=) :: ChannelListGroup -> ChannelListGroup -> Bool # | |
Show ChannelListGroup Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> ChannelListGroup -> ShowS # show :: ChannelListGroup -> String # showList :: [ChannelListGroup] -> ShowS # |
type ThreadInterface = MessageInterface Name PostId Source #
type ChannelMessageInterface = MessageInterface Name () Source #
trimChannelSigil :: Text -> Text Source #
data ChannelSelectState Source #
The state of channel selection mode.
channelSelectMatches :: Lens' ChannelSelectState (Zipper ChannelListGroup ChannelSelectMatch) Source #
All application state specific to a team, along with state specific to our user interface's presentation of that team. We include the UI state relevant to the team so that we can easily switch which team the UI is presenting without having to reinitialize the UI from the new team. This allows the user to be engaged in just about any application activity while viewing a team, switch to another team, and return to the original team and resume what they were doing, all without us doing any work.
TeamState | |
|
tsViewedMessage :: Lens' TeamState (Maybe (Message, TabbedWindow ChatState MH Name ViewMessageWindowTab)) Source #
tsReactionEmojiListWindow :: Lens' TeamState (ListWindowState (Bool, Text) ()) Source #
data MessageInterfaceFocus Source #
Instances
Eq MessageInterfaceFocus Source # | |
Defined in Matterhorn.Types (==) :: MessageInterfaceFocus -> MessageInterfaceFocus -> Bool # (/=) :: MessageInterfaceFocus -> MessageInterfaceFocus -> Bool # | |
Show MessageInterfaceFocus Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> MessageInterfaceFocus -> ShowS # show :: MessageInterfaceFocus -> String # showList :: [MessageInterfaceFocus] -> ShowS # |
This type represents the current state of our application at any given time.
newState :: StartupStateInfo -> ChatState Source #
withCurrentChannel :: TeamId -> (ChannelId -> ClientChannel -> MH ()) -> MH () Source #
withCurrentChannel' :: TeamId -> (ChannelId -> ClientChannel -> MH (Maybe a)) -> MH (Maybe a) Source #
data GlobalEditState Source #
The GlobalEditState
value contains state not specific to any
single editor.
data PostListWindowState Source #
The state of the post list window.
data UserSearchScope Source #
The scope for searching for users in a user list window.
data ListWindowState a b Source #
The state of the search result list window. Type a
is the type
of data in the list. Type b
is the search scope type.
ListWindowState | |
|
listWindowSearchResults :: forall a b. Lens' (ListWindowState a b) (List Name a) Source #
listWindowSearchInput :: forall a b. Lens' (ListWindowState a b) (Editor Text Name) Source #
listWindowSearchScope :: forall a b. Lens' (ListWindowState a b) b Source #
listWindowSearching :: forall a b. Lens' (ListWindowState a b) Bool Source #
listWindowEnterHandler :: forall a b. Lens' (ListWindowState a b) (a -> MH Bool) Source #
listWindowNewList :: forall a b. Lens' (ListWindowState a b) (Vector a -> List Name a) Source #
listWindowFetchResults :: forall a b. Lens' (ListWindowState a b) (b -> Session -> Text -> IO (Vector a)) Source #
listWindowRecordCount :: forall a b. Lens' (ListWindowState a b) (Maybe Int) Source #
data ChatResources Source #
ChatResources
represents configuration and connection-related
information, as opposed to current model or view information.
Information that goes in the ChatResources
value should be limited
to information that we read or set up prior to setting up the bulk of
the application state.
getSession :: MH Session Source #
specialUserMentions :: [Text] Source #
applyTeamOrder :: [TeamId] -> MH () Source #
refreshTeamZipper :: MH () Source #
data UserPreferences Source #
dmChannelShowPreference :: UserPreferences -> UserId -> Maybe Bool Source #
data WebsocketAction Source #
Actions that can be sent on the websocket to the server.
UserTyping UTCTime ChannelId (Maybe PostId) | user typing in the input box |
Instances
Eq WebsocketAction Source # | |
Defined in Matterhorn.Types (==) :: WebsocketAction -> WebsocketAction -> Bool # (/=) :: WebsocketAction -> WebsocketAction -> Bool # | |
Ord WebsocketAction Source # | |
Defined in Matterhorn.Types compare :: WebsocketAction -> WebsocketAction -> Ordering # (<) :: WebsocketAction -> WebsocketAction -> Bool # (<=) :: WebsocketAction -> WebsocketAction -> Bool # (>) :: WebsocketAction -> WebsocketAction -> Bool # (>=) :: WebsocketAction -> WebsocketAction -> Bool # max :: WebsocketAction -> WebsocketAction -> WebsocketAction # min :: WebsocketAction -> WebsocketAction -> WebsocketAction # | |
Read WebsocketAction Source # | |
Defined in Matterhorn.Types | |
Show WebsocketAction Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> WebsocketAction -> ShowS # show :: WebsocketAction -> String # showList :: [WebsocketAction] -> ShowS # |
data CmdArgs :: Type -> Type where Source #
The CmdArgs
type represents the arguments to a slash-command; the
type parameter represents the argument structure.
A value of type MH
a
represents a computation that can
manipulate the application state and also request that the
application quit
runMHEvent :: ChatState -> MH () -> EventM Name (Next ChatState) Source #
Run an MM
computation, choosing whether to continue or halt based
on the resulting
scheduleUserFetches :: [UserFetch] -> MH () Source #
scheduleUserStatusFetches :: [UserId] -> MH () Source #
generateUUID :: MH UUID Source #
generateUUID_IO :: IO UUID Source #
mhContinueWithoutRedraw :: MH () Source #
gets :: MonadState s m => (s -> a) -> m a #
Gets specific component of the state, using a projection function supplied.
mhGetIOLogger :: MH (LogCategory -> Text -> IO ()) Source #
Get a logger suitable for use in IO. The logger always logs using the MH monad log context at the time of the call to mhGetIOLogger.
ioLogWithManager :: LogManager -> Maybe LogContext -> LogCategory -> Text -> IO () Source #
data LogContext Source #
Logging context information, in the event that metadata should accompany a log message.
Instances
Eq LogContext Source # | |
Defined in Matterhorn.Types (==) :: LogContext -> LogContext -> Bool # (/=) :: LogContext -> LogContext -> Bool # | |
Show LogContext Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> LogContext -> ShowS # show :: LogContext -> String # showList :: [LogContext] -> ShowS # |
withLogContext :: (Maybe LogContext -> Maybe LogContext) -> MH a -> MH a Source #
Use a modified logging context for the duration of the specified MH action.
getLogContext :: MH (Maybe LogContext) Source #
Get the current logging context.
data LogMessage Source #
A log message.
LogMessage | |
|
Instances
Eq LogMessage Source # | |
Defined in Matterhorn.Types (==) :: LogMessage -> LogMessage -> Bool # (/=) :: LogMessage -> LogMessage -> Bool # | |
Show LogMessage Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> LogMessage -> ShowS # show :: LogMessage -> String # showList :: [LogMessage] -> ShowS # |
data LogCommand Source #
A logging thread command.
LogToFile FilePath | Start logging to the specified path. |
LogAMessage !LogMessage | Log the specified message. |
StopLogging | Stop any active logging. |
ShutdownLogging | Shut down. |
GetLogDestination | Ask the logging thread about its active logging destination. |
LogSnapshot FilePath | Ask the logging thread to dump the current buffer to the specified destination. |
Instances
Show LogCommand Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> LogCommand -> ShowS # show :: LogCommand -> String # showList :: [LogCommand] -> ShowS # |
data LogCategory Source #
Log message tags.
Instances
Eq LogCategory Source # | |
Defined in Matterhorn.Types (==) :: LogCategory -> LogCategory -> Bool # (/=) :: LogCategory -> LogCategory -> Bool # | |
Show LogCategory Source # | |
Defined in Matterhorn.Types showsPrec :: Int -> LogCategory -> ShowS # show :: LogCategory -> String # showList :: [LogCategory] -> ShowS # |
data LogManager Source #
A handle to the log manager thread.
startLoggingToFile :: LogManager -> FilePath -> IO () Source #
stopLoggingToFile :: LogManager -> IO () Source #
requestLogSnapshot :: LogManager -> FilePath -> IO () Source #
requestLogDestination :: LogManager -> IO () Source #
sendLogMessage :: LogManager -> LogMessage -> IO () Source #
requestQuit :: MH () Source #
This will request that after this computation finishes the application should exit
withChannel :: ChannelId -> (ClientChannel -> MH ()) -> MH () Source #
withChannelOrDefault :: ChannelId -> a -> (ClientChannel -> MH a) -> MH a Source #
resetAutocomplete :: Traversal' ChatState (EditState n) -> MH () Source #
myUsername :: ChatState -> Text Source #
allUserIds :: ChatState -> [UserId] Source #
addNewUser :: UserInfo -> MH () Source #
useNickname :: ChatState -> Bool Source #
useNickname' :: Maybe ClientConfig -> UserPreferences -> Bool Source #
displayNameForUser :: UserInfo -> Maybe ClientConfig -> UserPreferences -> Text Source #
raiseInternalEvent :: InternalEvent -> MH () Source #
data HighlightSet Source #
The set of usernames, channel names, and language names used for highlighting when rendering messages.
HighlightSet | |
|
type ChannelSet = Set Text Source #
getHighlightSet :: ChatState -> TeamId -> HighlightSet Source #
module Matterhorn.Types.Core
module Matterhorn.Types.Channels
module Matterhorn.Types.EditState
module Matterhorn.Types.Messages
module Matterhorn.Types.Posts
module Matterhorn.Types.Users