Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data Conversation = Conversation {}
- data NewConversation
- isConvDeleted :: Conversation -> Bool
- selfConv :: UserId -> ConvId
- localOne2OneConvId :: UUID V4 -> UUID V4 -> ConvId
- convAccess :: Conversation -> [Access]
- convAccessData :: Conversation -> ConversationAccessData
- convAccessRoles :: Conversation -> Set AccessRole
- convMessageTimer :: Conversation -> Maybe Milliseconds
- convName :: Conversation -> Maybe Text
- convReceiptMode :: Conversation -> Maybe ReceiptMode
- convSetName :: Maybe Text -> Conversation -> Conversation
- convType :: Conversation -> ConvType
- convSetType :: ConvType -> Conversation -> Conversation
- convTeam :: Conversation -> Maybe TeamId
- defRole :: Set AccessRole
- maybeRole :: ConvType -> Maybe (Set AccessRole) -> Set AccessRole
- defRegularConvAccess :: [Access]
- parseAccessRoles :: Maybe AccessRoleLegacy -> Maybe (Set AccessRole) -> Maybe (Set AccessRole)
Data Conversation types
data Conversation Source #
Internal conversation type, corresponding directly to database schema.
Should never be sent to users (and therefore doesn't have FromJSON
or
ToJSON
instances).
Instances
Show Conversation Source # | |
Defined in Galley.Data.Conversation.Types showsPrec :: Int -> Conversation -> ShowS # show :: Conversation -> String # showList :: [Conversation] -> ShowS # |
data NewConversation Source #
Utilities
isConvDeleted :: Conversation -> Bool Source #
localOne2OneConvId :: UUID V4 -> UUID V4 -> ConvId Source #
We deduce the conversation ID by adding the 4 components of the V4 UUID together pairwise, and then setting the version bits (v4) and variant bits (variant 2). This means that we always know what the UUID is for a one-to-one conversation which hopefully makes them unique.
convAccess :: Conversation -> [Access] Source #
convSetName :: Maybe Text -> Conversation -> Conversation Source #
convType :: Conversation -> ConvType Source #
convSetType :: ConvType -> Conversation -> Conversation Source #
defRole :: Set AccessRole Source #
maybeRole :: ConvType -> Maybe (Set AccessRole) -> Set AccessRole Source #
parseAccessRoles :: Maybe AccessRoleLegacy -> Maybe (Set AccessRole) -> Maybe (Set AccessRole) Source #