Safe Haskell | None |
---|---|
Language | Haskell2010 |
Matterhorn.Types
Synopsis
- data ConnectionStatus
- data HelpTopic = HelpTopic {}
- data MessageSelectState = MessageSelectState {}
- data ProgramOutput = ProgramOutput {}
- data MHEvent
- data InternalEvent
- data Name
- = ChannelMessages ChannelId
- | MessageInput TeamId
- | ChannelList TeamId
- | HelpViewport
- | HelpText
- | ScriptHelpText
- | ThemeHelpText
- | SyntaxHighlightHelpText
- | KeybindingHelpText
- | ChannelSelectString TeamId
- | ChannelSelectEntry ChannelSelectMatch
- | CompletionAlternatives TeamId
- | CompletionList TeamId
- | JoinChannelList TeamId
- | UrlList TeamId
- | MessagePreviewViewport TeamId
- | ThemeListSearchInput TeamId
- | UserListSearchInput TeamId
- | JoinChannelListSearchInput TeamId
- | UserListSearchResults TeamId
- | ThemeListSearchResults TeamId
- | ViewMessageArea TeamId
- | ViewMessageReactionsArea TeamId
- | ChannelSidebar TeamId
- | ChannelSelectInput TeamId
- | AttachmentList TeamId
- | AttachmentFileBrowser TeamId
- | MessageReactionsArea TeamId
- | ReactionEmojiList TeamId
- | ReactionEmojiListInput TeamId
- | TabbedWindowTabBar TeamId
- | MuteToggleField TeamId
- | ChannelMentionsField TeamId
- | DesktopNotificationsField TeamId (WithDefault NotifyOption)
- | PushNotificationsField TeamId (WithDefault NotifyOption)
- | ChannelTopicEditor TeamId
- | ChannelTopicSaveButton TeamId
- | ChannelTopicCancelButton TeamId
- | ChannelTopicEditorPreview TeamId
- | ChannelTopic
- | TeamList
- | ClickableChannelListEntry ChannelId
- | ClickableTeamListEntry TeamId
- | ClickableURL Name Int LinkTarget
- | ClickableURLInMessage MessageId Int LinkTarget
- | ClickableUsernameInMessage MessageId Int Text
- | ClickableUsername Name Int Text
- | ClickableURLListEntry Int LinkTarget
- | ClickableReactionInMessage PostId Text (Set UserId)
- | ClickableReaction PostId Text (Set UserId)
- | AttachmentPathEditor TeamId
- | AttachmentPathSaveButton TeamId
- | AttachmentPathCancelButton TeamId
- | RenderedMessage MessageId
- | ReactionEmojiListOverlayEntry (Bool, Text)
- data ChannelSelectMatch = ChannelSelectMatch {}
- 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 AttachmentData = AttachmentData {}
- data CPUUsagePolicy
- class (Show a, Eq a, Ord a) => SemEq a where
- tabbedWindow :: (Show a, Eq a) => a -> TabbedWindowTemplate a -> Mode -> (Int, Int) -> TabbedWindow a
- getCurrentTabbedWindowEntry :: (Show a, Eq a) => TabbedWindow a -> TabbedWindowEntry a
- tabbedWindowNextTab :: (Show a, Eq a) => TabbedWindow a -> MH (TabbedWindow a)
- tabbedWindowPreviousTab :: (Show a, Eq a) => TabbedWindow a -> MH (TabbedWindow a)
- runTabShowHandlerFor :: (Eq a, Show a) => a -> TabbedWindow a -> MH ()
- getServerBaseUrl :: TeamId -> MH TeamBaseURL
- serverBaseUrl :: ChatState -> TeamId -> TeamBaseURL
- data TabbedWindow a = TabbedWindow {
- twValue :: a
- twReturnMode :: Mode
- twTemplate :: TabbedWindowTemplate a
- twWindowWidth :: Int
- twWindowHeight :: Int
- data TabbedWindowEntry a = TabbedWindowEntry {}
- data TabbedWindowTemplate a = TabbedWindowTemplate {
- twtEntries :: [TabbedWindowEntry a]
- twtTitle :: a -> Widget Name
- data ConnectionInfo = ConnectionInfo {
- _ciHostname :: Text
- _ciPort :: Int
- _ciUrlPath :: Text
- _ciUsername :: Text
- _ciPassword :: Text
- _ciAccessToken :: Text
- _ciType :: ConnectionType
- data SidebarUpdate
- data PendingChannelChange
- = ChangeByChannelId TeamId ChannelId (Maybe (MH ()))
- | ChangeByUserId UserId
- data ViewMessageWindowTab
- clearChannelUnreadStatus :: ChannelId -> MH ()
- data ChannelListEntry = ChannelListEntry {}
- data ChannelListEntryType
- 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
- ciPassword :: Lens' ConnectionInfo Text
- ciType :: Lens' ConnectionInfo ConnectionType
- ciAccessToken :: Lens' ConnectionInfo Text
- newChannelTopicDialog :: TeamId -> Text -> ChannelTopicDialogState
- data ChannelTopicDialogState = ChannelTopicDialogState {}
- channelTopicDialogEditor :: Lens' ChannelTopicDialogState (Editor Text Name)
- channelTopicDialogFocus :: Lens' ChannelTopicDialogState (FocusRing Name)
- newSaveAttachmentDialog :: TeamId -> Text -> SaveAttachmentDialogState
- data SaveAttachmentDialogState = SaveAttachmentDialogState {}
- attachmentPathEditor :: Lens' SaveAttachmentDialogState (Editor Text Name)
- attachmentPathDialogFocus :: Lens' SaveAttachmentDialogState (FocusRing Name)
- 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
- 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
- configShowTypingIndicator :: Bool
- configAbsPath :: Maybe FilePath
- configUserKeys :: KeyConfig
- configHyperlinkingMode :: Bool
- configSyntaxDirs :: [FilePath]
- configDirectChannelExpirationDays :: Int
- configCpuUsagePolicy :: CPUUsagePolicy
- configDefaultAttachmentPath :: Maybe FilePath
- configChannelListOrientation :: ChannelListOrientation
- configMouseMode :: 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
- 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
- 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
- configMouseModeL :: Lens' Config Bool
- data NotificationVersion
- data HelpScreen
- data PasswordSource
- data TokenSource
- data MatchType
- data Mode
- = Main
- | ShowHelp HelpTopic Mode
- | ChannelSelect
- | UrlSelect
- | LeaveChannelConfirm
- | DeleteChannelConfirm
- | MessageSelect
- | MessageSelectDeleteConfirm
- | PostListOverlay PostListContents
- | UserListOverlay
- | ReactionEmojiListOverlay
- | ChannelListOverlay
- | ThemeListOverlay
- | ViewMessage
- | ManageAttachments
- | ManageAttachmentsBrowseFiles
- | EditNotifyPrefs
- | ChannelTopicWindow
- | SaveAttachmentWindow LinkChoice
- 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]
- mkTeamZipper :: HashMap TeamId TeamState -> Zipper () TeamId
- mkTeamZipperFromIds :: [TeamId] -> Zipper () TeamId
- teamZipperIds :: Zipper () TeamId -> [TeamId]
- mkChannelZipperList :: UTCTime -> Config -> TeamId -> Maybe ClientConfig -> UserPreferences -> ClientChannels -> Users -> [(ChannelListGroup, [ChannelListEntry])]
- data ChannelListGroup
- channelListGroupUnread :: ChannelListGroup -> Int
- nonDMChannelListGroupUnread :: ChannelListGroup -> Int
- 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
- _tsPendingChannelChange :: Maybe PendingChannelChange
- _tsRecentChannel :: Maybe ChannelId
- _tsReturnChannel :: Maybe ChannelId
- _tsEditState :: ChatEditState
- _tsMessageSelect :: MessageSelectState
- _tsTeam :: Team
- _tsChannelSelectState :: ChannelSelectState
- _tsUrlList :: List Name (Int, LinkChoice)
- _tsViewedMessage :: Maybe (Message, TabbedWindow ViewMessageWindowTab)
- _tsPostListOverlay :: PostListOverlayState
- _tsUserListOverlay :: ListOverlayState UserInfo UserSearchScope
- _tsChannelListOverlay :: ListOverlayState Channel ChannelSearchScope
- _tsNotifyPrefs :: Maybe (Form ChannelNotifyProps MHEvent Name)
- _tsChannelTopicDialog :: ChannelTopicDialogState
- _tsMode :: Mode
- _tsReactionEmojiListOverlay :: ListOverlayState (Bool, Text) ()
- _tsThemeListOverlay :: ListOverlayState InternalTheme ()
- _tsSaveAttachmentDialog :: SaveAttachmentDialogState
- tsFocus :: Lens' TeamState (Zipper ChannelListGroup ChannelListEntry)
- tsMode :: Lens' TeamState Mode
- tsPendingChannelChange :: Lens' TeamState (Maybe PendingChannelChange)
- tsRecentChannel :: Lens' TeamState (Maybe ChannelId)
- tsReturnChannel :: Lens' TeamState (Maybe ChannelId)
- tsEditState :: Lens' TeamState ChatEditState
- tsMessageSelect :: Lens' TeamState MessageSelectState
- tsTeam :: Lens' TeamState Team
- tsChannelSelectState :: Lens' TeamState ChannelSelectState
- tsUrlList :: Lens' TeamState (List Name (Int, LinkChoice))
- tsViewedMessage :: Lens' TeamState (Maybe (Message, TabbedWindow ViewMessageWindowTab))
- tsPostListOverlay :: Lens' TeamState PostListOverlayState
- tsUserListOverlay :: Lens' TeamState (ListOverlayState UserInfo UserSearchScope)
- tsChannelListOverlay :: Lens' TeamState (ListOverlayState Channel ChannelSearchScope)
- tsNotifyPrefs :: Lens' TeamState (Maybe (Form ChannelNotifyProps MHEvent Name))
- tsChannelTopicDialog :: Lens' TeamState ChannelTopicDialogState
- tsReactionEmojiListOverlay :: Lens' TeamState (ListOverlayState (Bool, Text) ())
- tsThemeListOverlay :: Lens' TeamState (ListOverlayState InternalTheme ())
- tsSaveAttachmentDialog :: Lens' TeamState SaveAttachmentDialogState
- data ChatState
- newState :: StartupStateInfo -> ChatState
- newTeamState :: Team -> Zipper ChannelListGroup ChannelListEntry -> Maybe (Aspell, IO ()) -> TeamState
- csTeamZipper :: Lens' ChatState (Zipper () TeamId)
- csCurrentTeam :: Lens' ChatState TeamState
- 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))
- csCurrentChannel :: Lens' ChatState ClientChannel
- csCurrentChannelId :: TeamId -> SimpleGetter ChatState ChannelId
- csCurrentTeamId :: SimpleGetter ChatState TeamId
- csPostMap :: Lens' ChatState (HashMap PostId Message)
- csUsers :: Lens' ChatState Users
- csConnectionStatus :: Lens' ChatState ConnectionStatus
- csWorkerIsBusy :: Lens' ChatState (Maybe (Maybe Int))
- csChannel :: ChannelId -> Traversal' ChatState ClientChannel
- csChannels :: Lens' ChatState ClientChannels
- csClientConfig :: Lens' ChatState (Maybe ClientConfig)
- csInputHistory :: Lens' ChatState InputHistory
- csMe :: Lens' ChatState User
- timeZone :: Lens' ChatState TimeZoneSeries
- whenMode :: Mode -> MH () -> MH ()
- setMode :: Mode -> MH ()
- setMode' :: Mode -> ChatState -> ChatState
- data ChatEditState
- emptyEditState :: TeamId -> ChatEditState
- cedAttachmentList :: Lens' ChatEditState (List Name AttachmentData)
- cedFileBrowser :: Lens' ChatEditState (Maybe (FileBrowser Name))
- unsafeCedFileBrowser :: Lens' ChatEditState (FileBrowser Name)
- cedYankBuffer :: Lens' ChatEditState Text
- cedSpellChecker :: Lens' ChatEditState (Maybe (Aspell, IO ()))
- cedMisspellings :: Lens' ChatEditState (Set Text)
- cedEditMode :: Lens' ChatEditState EditMode
- cedEphemeral :: Lens' ChatEditState EphemeralEditState
- cedEditor :: Lens' ChatEditState (Editor Text Name)
- cedAutocomplete :: Lens' ChatEditState (Maybe AutocompleteState)
- cedAutocompletePending :: Lens' ChatEditState (Maybe Text)
- cedJustCompleted :: Lens' ChatEditState Bool
- data AutocompleteState = AutocompleteState {}
- acPreviousSearchString :: Lens' AutocompleteState Text
- acCompletionList :: Lens' AutocompleteState (List Name AutocompleteAlternative)
- acCachedResponses :: Lens' AutocompleteState (HashMap Text [AutocompleteAlternative])
- acType :: Lens' AutocompleteState AutocompletionType
- data AutocompletionType
- data CompletionSource
- data AutocompleteAlternative
- autocompleteAlternativeReplacement :: AutocompleteAlternative -> Text
- data SpecialMention
- specialMentionName :: SpecialMention -> Text
- isSpecialMention :: Text -> Bool
- data PostListOverlayState
- postListSelected :: Lens' PostListOverlayState (Maybe PostId)
- postListPosts :: Lens' PostListOverlayState Messages
- data UserSearchScope
- data ChannelSearchScope = AllChannels
- data ListOverlayState a b
- listOverlaySearchResults :: forall a b. Lens' (ListOverlayState a b) (List Name a)
- listOverlaySearchInput :: forall a b. Lens' (ListOverlayState a b) (Editor Text Name)
- listOverlaySearchScope :: forall a b. Lens' (ListOverlayState a b) b
- listOverlaySearching :: forall a b. Lens' (ListOverlayState a b) Bool
- listOverlayEnterHandler :: forall a b. Lens' (ListOverlayState a b) (a -> MH Bool)
- listOverlayNewList :: forall a b. Lens' (ListOverlayState a b) (Vector a -> List Name a)
- listOverlayFetchResults :: forall a b. Lens' (ListOverlayState a b) (b -> Session -> Text -> IO (Vector a))
- listOverlayRecordCount :: forall a b. Lens' (ListOverlayState a b) (Maybe Int)
- listOverlayReturnMode :: forall a b. Lens' (ListOverlayState a b) Mode
- 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
- 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
- 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 ()
- 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
- resetSpellCheckTimer :: ChatEditState -> IO ()
- withChannel :: ChannelId -> (ClientChannel -> MH ()) -> MH ()
- withChannelOrDefault :: ChannelId -> a -> (ClientChannel -> MH a) -> MH a
- userList :: ChatState -> [UserInfo]
- resetAutocomplete :: 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 :: 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 -> HighlightSet
- emptyHSet :: HighlightSet
- moveLeft :: Eq a => a -> [a] -> [a]
- moveRight :: Eq a => a -> [a] -> [a]
- module Matterhorn.Types.Channels
- module Matterhorn.Types.Messages
- module Matterhorn.Types.Posts
- module Matterhorn.Types.Users
Documentation
data ConnectionStatus Source #
We're either connected or we're not.
Constructors
Connected | |
Disconnected |
Instances
Eq ConnectionStatus Source # | |
Defined in Matterhorn.Types Methods (==) :: ConnectionStatus -> ConnectionStatus -> Bool # (/=) :: ConnectionStatus -> ConnectionStatus -> Bool # |
Help topics
Constructors
HelpTopic | |
Fields |
data MessageSelectState Source #
The state of message selection mode.
Constructors
MessageSelectState | |
Fields |
data ProgramOutput Source #
Constructors
ProgramOutput | |
Fields
|
This represents events that we handle in the main application loop.
Constructors
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.
Constructors
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 |
This Name
type is the type used in brick
to identify various
parts of the interface.
Constructors
data ChannelSelectMatch Source #
A match in channel selection mode.
Constructors
ChannelSelectMatch | |
Fields
|
Instances
Eq ChannelSelectMatch Source # | |
Defined in Matterhorn.Types Methods (==) :: ChannelSelectMatch -> ChannelSelectMatch -> Bool # (/=) :: ChannelSelectMatch -> ChannelSelectMatch -> Bool # | |
Ord ChannelSelectMatch Source # | |
Defined in Matterhorn.Types Methods compare :: ChannelSelectMatch -> ChannelSelectMatch -> Ordering # (<) :: ChannelSelectMatch -> ChannelSelectMatch -> Bool # (<=) :: ChannelSelectMatch -> ChannelSelectMatch -> Bool # (>) :: ChannelSelectMatch -> ChannelSelectMatch -> Bool # (>=) :: ChannelSelectMatch -> ChannelSelectMatch -> Bool # max :: ChannelSelectMatch -> ChannelSelectMatch -> ChannelSelectMatch # min :: ChannelSelectMatch -> ChannelSelectMatch -> ChannelSelectMatch # | |
Show ChannelSelectMatch Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> ChannelSelectMatch -> ShowS # show :: ChannelSelectMatch -> String # showList :: [ChannelSelectMatch] -> ShowS # |
data StartupStateInfo Source #
Startup state information that is constructed prior to building a ChatState.
Application errors.
Constructors
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 AttachmentData Source #
An attachment.
Constructors
AttachmentData | |
Fields |
Instances
Eq AttachmentData Source # | |
Defined in Matterhorn.Types Methods (==) :: AttachmentData -> AttachmentData -> Bool # (/=) :: AttachmentData -> AttachmentData -> Bool # | |
Show AttachmentData Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> AttachmentData -> ShowS # show :: AttachmentData -> String # showList :: [AttachmentData] -> ShowS # |
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.
Constructors
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 Methods (==) :: CPUUsagePolicy -> CPUUsagePolicy -> Bool # (/=) :: CPUUsagePolicy -> CPUUsagePolicy -> Bool # | |
Show CPUUsagePolicy Source # | |
Defined in Matterhorn.Types Methods 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.
Arguments
:: (Show a, Eq a) | |
=> a | The handle corresponding to the tab that should be selected initially. |
-> TabbedWindowTemplate a | The template for the window to construct. |
-> Mode | When the window is closed, return to this application mode. |
-> (Int, Int) | The window dimensions (width, height). |
-> TabbedWindow a |
Construct a new tabbed window from a template. This will raise an exception if the initially-selected tab does not exist in the window template, or if the window template has any duplicated tab handles.
Note that the caller is responsible for determining whether to call the initially-selected tab's on-show handler.
getCurrentTabbedWindowEntry :: (Show a, Eq a) => TabbedWindow a -> TabbedWindowEntry a Source #
Get the currently-selected tab entry for a tabbed window. Raise an exception if the window's selected tab handle is not found in its template (which is a bug in the tabbed window infrastructure).
tabbedWindowNextTab :: (Show a, Eq a) => TabbedWindow a -> MH (TabbedWindow a) Source #
Switch a tabbed window's selected tab to its next tab, cycling back to the first tab if the last tab is the selected tab. This also invokes the on-show handler for the newly-selected tab.
Note that this does nothing if the window has only one tab.
tabbedWindowPreviousTab :: (Show a, Eq a) => TabbedWindow a -> MH (TabbedWindow a) Source #
Switch a tabbed window's selected tab to its previous tab, cycling to the last tab if the first tab is the selected tab. This also invokes the on-show handler for the newly-selected tab.
Note that this does nothing if the window has only one tab.
runTabShowHandlerFor :: (Eq a, Show a) => a -> TabbedWindow a -> MH () Source #
Run the on-show handler for the window tab entry with the specified handle.
getServerBaseUrl :: TeamId -> MH TeamBaseURL Source #
serverBaseUrl :: ChatState -> TeamId -> TeamBaseURL Source #
data TabbedWindow a Source #
An instantiated tab window. This is based on a template and tracks the state of the tabbed window (current tab).
Parameterized over an abstract handle type (a
) for the tabs so we
can give each a unique handle.
Constructors
TabbedWindow | |
Fields
|
data TabbedWindowEntry a Source #
An entry in a tabbed window corresponding to a tab and its content.
Parameterized over an abstract handle type (a
) for the tabs so we
can give each a unique handle.
Constructors
TabbedWindowEntry | |
Fields
|
data TabbedWindowTemplate a Source #
The definition of a tabbed window. Note that this does not track the *state* of the window; it merely provides a collection of tab window entries (see above). To track the state of a tabbed window, use a TabbedWindow.
Parameterized over an abstract handle type (a
) for the tabs so we
can give each a unique handle.
Constructors
TabbedWindowTemplate | |
Fields
|
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.
Constructors
ConnectionInfo | |
Fields
|
data SidebarUpdate Source #
Constructors
SidebarUpdateImmediate | |
SidebarUpdateDeferred |
Instances
Eq SidebarUpdate Source # | |
Defined in Matterhorn.Types Methods (==) :: SidebarUpdate -> SidebarUpdate -> Bool # (/=) :: SidebarUpdate -> SidebarUpdate -> Bool # | |
Show SidebarUpdate Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> SidebarUpdate -> ShowS # show :: SidebarUpdate -> String # showList :: [SidebarUpdate] -> ShowS # |
data PendingChannelChange Source #
Constructors
ChangeByChannelId TeamId ChannelId (Maybe (MH ())) | |
ChangeByUserId UserId |
data ViewMessageWindowTab Source #
Handles for the View Message window's tabs.
Constructors
VMTabMessage | The message tab. |
VMTabReactions | The reactions tab. |
Instances
Eq ViewMessageWindowTab Source # | |
Defined in Matterhorn.Types Methods (==) :: ViewMessageWindowTab -> ViewMessageWindowTab -> Bool # (/=) :: ViewMessageWindowTab -> ViewMessageWindowTab -> Bool # | |
Show ViewMessageWindowTab Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> ViewMessageWindowTab -> ShowS # show :: ViewMessageWindowTab -> String # showList :: [ViewMessageWindowTab] -> ShowS # |
clearChannelUnreadStatus :: ChannelId -> MH () Source #
data ChannelListEntry Source #
The type of channel list entries.
Constructors
ChannelListEntry | |
Instances
Eq ChannelListEntry Source # | |
Defined in Matterhorn.Types Methods (==) :: ChannelListEntry -> ChannelListEntry -> Bool # (/=) :: ChannelListEntry -> ChannelListEntry -> Bool # | |
Ord ChannelListEntry Source # | |
Defined in Matterhorn.Types Methods compare :: ChannelListEntry -> ChannelListEntry -> Ordering # (<) :: ChannelListEntry -> ChannelListEntry -> Bool # (<=) :: ChannelListEntry -> ChannelListEntry -> Bool # (>) :: ChannelListEntry -> ChannelListEntry -> Bool # (>=) :: ChannelListEntry -> ChannelListEntry -> Bool # max :: ChannelListEntry -> ChannelListEntry -> ChannelListEntry # min :: ChannelListEntry -> ChannelListEntry -> ChannelListEntry # | |
Show ChannelListEntry Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> ChannelListEntry -> ShowS # show :: ChannelListEntry -> String # showList :: [ChannelListEntry] -> ShowS # |
data ChannelListEntryType Source #
Constructors
CLChannel | A non-DM entry |
CLUserDM UserId | A single-user DM entry |
CLGroupDM | A multi-user DM entry |
Instances
Eq ChannelListEntryType Source # | |
Defined in Matterhorn.Types Methods (==) :: ChannelListEntryType -> ChannelListEntryType -> Bool # (/=) :: ChannelListEntryType -> ChannelListEntryType -> Bool # | |
Ord ChannelListEntryType Source # | |
Defined in Matterhorn.Types Methods compare :: ChannelListEntryType -> ChannelListEntryType -> Ordering # (<) :: ChannelListEntryType -> ChannelListEntryType -> Bool # (<=) :: ChannelListEntryType -> ChannelListEntryType -> Bool # (>) :: ChannelListEntryType -> ChannelListEntryType -> Bool # (>=) :: ChannelListEntryType -> ChannelListEntryType -> Bool # max :: ChannelListEntryType -> ChannelListEntryType -> ChannelListEntryType # min :: ChannelListEntryType -> ChannelListEntryType -> ChannelListEntryType # | |
Show ChannelListEntryType Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> ChannelListEntryType -> ShowS # show :: ChannelListEntryType -> String # showList :: [ChannelListEntryType] -> ShowS # |
data ChannelListOrientation Source #
Constructors
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 Methods (==) :: ChannelListOrientation -> ChannelListOrientation -> Bool # (/=) :: ChannelListOrientation -> ChannelListOrientation -> Bool # | |
Show ChannelListOrientation Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> ChannelListOrientation -> ShowS # show :: ChannelListOrientation -> String # showList :: [ChannelListOrientation] -> ShowS # |
newChannelTopicDialog :: TeamId -> Text -> ChannelTopicDialogState Source #
Make a new channel topic editor window state.
data ChannelTopicDialogState Source #
The state of the channel topic editor window.
Constructors
ChannelTopicDialogState | |
Fields
|
newSaveAttachmentDialog :: TeamId -> Text -> SaveAttachmentDialogState Source #
Make a new attachment-saving editor window state.
data SaveAttachmentDialogState Source #
The state of the attachment path window.
Constructors
SaveAttachmentDialogState | |
Fields
|
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.
Constructors
Config | |
Fields
|
data NotificationVersion Source #
A notification version for the external notifier
Instances
Eq NotificationVersion Source # | |
Defined in Matterhorn.Types Methods (==) :: NotificationVersion -> NotificationVersion -> Bool # (/=) :: NotificationVersion -> NotificationVersion -> Bool # | |
Read NotificationVersion Source # | |
Defined in Matterhorn.Types Methods readsPrec :: Int -> ReadS NotificationVersion # readList :: ReadS [NotificationVersion] # | |
Show NotificationVersion Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> NotificationVersion -> ShowS # show :: NotificationVersion -> String # showList :: [NotificationVersion] -> ShowS # |
data HelpScreen Source #
The HelpScreen
type represents the set of possible Help
dialogues we have to choose from.
Constructors
MainHelp | |
ScriptHelp | |
ThemeHelp | |
SyntaxHighlightHelp | |
KeybindingHelp |
Instances
Eq HelpScreen Source # | |
Defined in Matterhorn.Types |
data PasswordSource Source #
A user password is either given to us directly, or a command which we execute to find the password.
Constructors
PasswordString Text | |
PasswordCommand Text |
Instances
Eq PasswordSource Source # | |
Defined in Matterhorn.Types Methods (==) :: PasswordSource -> PasswordSource -> Bool # (/=) :: PasswordSource -> PasswordSource -> Bool # | |
Read PasswordSource Source # | |
Defined in Matterhorn.Types Methods readsPrec :: Int -> ReadS PasswordSource # readList :: ReadS [PasswordSource] # | |
Show PasswordSource Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> PasswordSource -> ShowS # show :: PasswordSource -> String # showList :: [PasswordSource] -> ShowS # |
data TokenSource Source #
An access token source.
Constructors
TokenString Text | |
TokenCommand Text |
Instances
Eq TokenSource Source # | |
Defined in Matterhorn.Types | |
Read TokenSource Source # | |
Defined in Matterhorn.Types Methods readsPrec :: Int -> ReadS TokenSource # readList :: ReadS [TokenSource] # readPrec :: ReadPrec TokenSource # readListPrec :: ReadPrec [TokenSource] # | |
Show TokenSource Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> TokenSource -> ShowS # show :: TokenSource -> String # showList :: [TokenSource] -> ShowS # |
Constructors
Prefix | |
Suffix | |
Infix | |
Equal | |
PrefixDMOnly | |
PrefixNonDMOnly |
The Mode
represents the current dominant UI activity
Constructors
data ChannelSelectPattern Source #
Instances
Eq ChannelSelectPattern Source # | |
Defined in Matterhorn.Types Methods (==) :: ChannelSelectPattern -> ChannelSelectPattern -> Bool # (/=) :: ChannelSelectPattern -> ChannelSelectPattern -> Bool # | |
Show ChannelSelectPattern Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> ChannelSelectPattern -> ShowS # show :: ChannelSelectPattern -> String # showList :: [ChannelSelectPattern] -> ShowS # |
data PostListContents Source #
Mode type for the current contents of the post list overlay
Constructors
PostListFlagged | |
PostListPinned ChannelId | |
PostListSearch Text Bool |
Instances
Eq PostListContents Source # | |
Defined in Matterhorn.Types Methods (==) :: PostListContents -> PostListContents -> Bool # (/=) :: PostListContents -> PostListContents -> Bool # |
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
.
Constructors
ConnectError HostCannotConnect | |
ResolveError HostNotResolved | |
AuthIOError IOError | |
LoginError LoginFailureException | |
OtherAuthError SomeException |
Instances
Show AuthenticationException Source # | |
Defined in Matterhorn.Types Methods 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.
Constructors
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 Methods (==) :: BackgroundInfo -> BackgroundInfo -> Bool # (/=) :: BackgroundInfo -> BackgroundInfo -> Bool # | |
Show BackgroundInfo Source # | |
Defined in Matterhorn.Types Methods 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.
Constructors
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 #
Constructors
InternalTheme | |
Fields |
attrNameToConfig :: AttrName -> Text Source #
mkChannelZipperList :: UTCTime -> Config -> TeamId -> Maybe ClientConfig -> UserPreferences -> 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.
Constructors
ChannelGroupPublicChannels Int | |
ChannelGroupPrivateChannels Int | |
ChannelGroupFavoriteChannels Int | |
ChannelGroupDirectMessages Int |
Instances
Eq ChannelListGroup Source # | |
Defined in Matterhorn.Types Methods (==) :: ChannelListGroup -> ChannelListGroup -> Bool # (/=) :: ChannelListGroup -> ChannelListGroup -> Bool # |
trimChannelSigil :: Text -> Text Source #
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.
Constructors
TeamState | |
Fields
|
tsReactionEmojiListOverlay :: Lens' TeamState (ListOverlayState (Bool, Text) ()) Source #
This type represents the current state of our application at any given time.
newState :: StartupStateInfo -> ChatState Source #
newTeamState :: Team -> Zipper ChannelListGroup ChannelListEntry -> Maybe (Aspell, IO ()) -> TeamState Source #
data ChatEditState Source #
The ChatEditState
value contains the editor widget itself as well
as history and metadata we need for editing-related operations.
emptyEditState :: TeamId -> ChatEditState Source #
We can initialize a new ChatEditState
value with just an edit
history, which we save locally.
cedSpellChecker :: Lens' ChatEditState (Maybe (Aspell, IO ())) Source #
data AutocompleteState Source #
Constructors
AutocompleteState | |
Fields
|
data AutocompletionType Source #
The type of data that the autocompletion logic supports. We use this to track the kind of completion underway in case the type of completion needs to change.
Constructors
ACUsers | |
ACChannels | |
ACCodeBlockLanguage | |
ACEmoji | |
ACCommands |
Instances
Eq AutocompletionType Source # | |
Defined in Matterhorn.Types Methods (==) :: AutocompletionType -> AutocompletionType -> Bool # (/=) :: AutocompletionType -> AutocompletionType -> Bool # | |
Show AutocompletionType Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> AutocompletionType -> ShowS # show :: AutocompletionType -> String # showList :: [AutocompletionType] -> ShowS # |
data CompletionSource Source #
The source of an autocompletion alternative.
Instances
Eq CompletionSource Source # | |
Defined in Matterhorn.Types Methods (==) :: CompletionSource -> CompletionSource -> Bool # (/=) :: CompletionSource -> CompletionSource -> Bool # | |
Show CompletionSource Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> CompletionSource -> ShowS # show :: CompletionSource -> String # showList :: [CompletionSource] -> ShowS # |
data AutocompleteAlternative Source #
Constructors
UserCompletion User Bool | User, plus whether the user is in the channel that triggered the autocomplete |
SpecialMention SpecialMention | A special mention. |
ChannelCompletion Bool Channel | Channel, plus whether the user is a member of the channel |
SyntaxCompletion Text | Name of a skylighting syntax definition |
CommandCompletion CompletionSource Text Text Text | Source, name of a slash command, argspec, and description |
EmojiCompletion Text | The text of an emoji completion |
data SpecialMention Source #
A "special" mention that does not map to a specific user, but is an alias that the server uses to notify users.
Constructors
MentionAll | @all: notify everyone in the channel. |
MentionChannel | @channel: notify everyone in the channel. |
isSpecialMention :: Text -> Bool Source #
data PostListOverlayState Source #
The state of the post list overlay.
data UserSearchScope Source #
The scope for searching for users in a user list overlay.
Constructors
ChannelMembers ChannelId TeamId | |
ChannelNonMembers ChannelId TeamId | |
AllUsers (Maybe TeamId) |
data ChannelSearchScope Source #
The scope for searching for channels to join.
Constructors
AllChannels |
data ListOverlayState a b Source #
The state of the search result list overlay. Type a
is the type
of data in the list. Type b
is the search scope type.
listOverlaySearchResults :: forall a b. Lens' (ListOverlayState a b) (List Name a) Source #
listOverlaySearchInput :: forall a b. Lens' (ListOverlayState a b) (Editor Text Name) Source #
listOverlaySearchScope :: forall a b. Lens' (ListOverlayState a b) b Source #
listOverlaySearching :: forall a b. Lens' (ListOverlayState a b) Bool Source #
listOverlayEnterHandler :: forall a b. Lens' (ListOverlayState a b) (a -> MH Bool) Source #
listOverlayNewList :: forall a b. Lens' (ListOverlayState a b) (Vector a -> List Name a) Source #
listOverlayFetchResults :: forall a b. Lens' (ListOverlayState a b) (b -> Session -> Text -> IO (Vector a)) Source #
listOverlayRecordCount :: forall a b. Lens' (ListOverlayState a b) (Maybe Int) Source #
listOverlayReturnMode :: forall a b. Lens' (ListOverlayState a b) Mode 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.
Constructors
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.
Constructors
UserTyping UTCTime ChannelId (Maybe PostId) | user typing in the input box |
Instances
Eq WebsocketAction Source # | |
Defined in Matterhorn.Types Methods (==) :: WebsocketAction -> WebsocketAction -> Bool # (/=) :: WebsocketAction -> WebsocketAction -> Bool # | |
Ord WebsocketAction Source # | |
Defined in Matterhorn.Types Methods 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 Methods readsPrec :: Int -> ReadS WebsocketAction # readList :: ReadS [WebsocketAction] # | |
Show WebsocketAction Source # | |
Defined in Matterhorn.Types Methods 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 #
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.
Constructors
LogContext | |
Fields |
Instances
Eq LogContext Source # | |
Defined in Matterhorn.Types | |
Show LogContext Source # | |
Defined in Matterhorn.Types Methods 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.
Constructors
LogMessage | |
Fields
|
Instances
Eq LogMessage Source # | |
Defined in Matterhorn.Types | |
Show LogMessage Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> LogMessage -> ShowS # show :: LogMessage -> String # showList :: [LogMessage] -> ShowS # |
data LogCommand Source #
A logging thread command.
Constructors
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 Methods showsPrec :: Int -> LogCommand -> ShowS # show :: LogCommand -> String # showList :: [LogCommand] -> ShowS # |
data LogCategory Source #
Log message tags.
Constructors
LogGeneral | |
LogAPI | |
LogWebsocket | |
LogError | |
LogUserMark |
Instances
Eq LogCategory Source # | |
Defined in Matterhorn.Types | |
Show LogCategory Source # | |
Defined in Matterhorn.Types Methods showsPrec :: Int -> LogCategory -> ShowS # show :: LogCategory -> String # showList :: [LogCategory] -> ShowS # |
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
resetSpellCheckTimer :: ChatEditState -> IO () Source #
withChannel :: ChannelId -> (ClientChannel -> MH ()) -> MH () Source #
withChannelOrDefault :: ChannelId -> a -> (ClientChannel -> MH a) -> MH a Source #
resetAutocomplete :: 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.
Constructors
HighlightSet | |
Fields
|
type ChannelSet = Set Text Source #
module Matterhorn.Types.Channels
module Matterhorn.Types.Messages
module Matterhorn.Types.Posts
module Matterhorn.Types.Users