Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- getBotConversation :: (Member ConversationStore r, Member (ErrorS 'ConvNotFound) r, Member (Input (Local ())) r) => BotId -> ConvId -> Sem r BotConvView
- getUnqualifiedConversation :: (Member ConversationStore r, Member (ErrorS 'ConvNotFound) r, Member (ErrorS 'ConvAccessDenied) r, Member (Error InternalError) r, Member TinyLog r) => Local UserId -> ConvId -> Sem r Conversation
- getConversation :: forall r. (Member ConversationStore r, Member (ErrorS 'ConvNotFound) r, Member (ErrorS 'ConvAccessDenied) r, Member (Error FederationError) r, Member (Error InternalError) r, Member FederatorAccess r, Member TinyLog r) => Local UserId -> Qualified ConvId -> Sem r Conversation
- getConversationRoles :: (Member ConversationStore r, Member (ErrorS 'ConvNotFound) r, Member (ErrorS 'ConvAccessDenied) r) => Local UserId -> ConvId -> Sem r ConversationRolesList
- conversationIdsPageFromUnqualified :: Member (ListItems LegacyPaging ConvId) r => Local UserId -> Maybe ConvId -> Maybe (Range 1 1000 Int32) -> Sem r (ConversationList ConvId)
- conversationIdsPageFromV2 :: forall p r. (p ~ CassandraPaging, (Member ConversationStore r, Member (Error InternalError) r, Member (Input Env) r, Member (ListItems p ConvId) r, Member (ListItems p (Remote ConvId)) r, Member TinyLog r)) => ListGlobalSelfConvs -> Local UserId -> GetPaginatedConversationIds -> Sem r ConvIdsPage
- conversationIdsPageFrom :: forall p r. (p ~ CassandraPaging, (Member ConversationStore r, Member (Error InternalError) r, Member (Input Env) r, Member (ListItems p ConvId) r, Member (ListItems p (Remote ConvId)) r, Member TinyLog r)) => Local UserId -> GetPaginatedConversationIds -> Sem r ConvIdsPage
- getConversations :: (Member (Error InternalError) r, Member (ListItems LegacyPaging ConvId) r, Member ConversationStore r, Member TinyLog r) => Local UserId -> Maybe (Range 1 32 (CommaSeparatedList ConvId)) -> Maybe ConvId -> Maybe (Range 1 500 Int32) -> Sem r (ConversationList Conversation)
- listConversations :: (Member ConversationStore r, Member (Error InternalError) r, Member FederatorAccess r, Member TinyLog r) => Local UserId -> ListConversations -> Sem r ConversationsResponse
- iterateConversations :: (Member (ListItems LegacyPaging ConvId) r, Member ConversationStore r) => Local UserId -> Range 1 500 Int32 -> ([Conversation] -> Sem r a) -> Sem r [a]
- getLocalSelf :: (Member ConversationStore r, Member MemberStore r) => Local UserId -> ConvId -> Sem r (Maybe Member)
- internalGetMember :: (Member ConversationStore r, Member (Input (Local ())) r, Member MemberStore r) => ConvId -> UserId -> Sem r (Maybe Member)
- getConversationMeta :: (Member ConversationStore r, Member (ErrorS 'ConvNotFound) r) => ConvId -> Sem r ConversationMetadata
- getConversationByReusableCode :: forall r. (Member BrigAccess r, Member CodeStore r, Member ConversationStore r, Member (ErrorS 'CodeNotFound) r, Member (ErrorS 'InvalidConversationPassword) r, Member (ErrorS 'ConvNotFound) r, Member (ErrorS 'ConvAccessDenied) r, Member (ErrorS 'GuestLinksDisabled) r, Member (ErrorS 'NotATeamMember) r, Member TeamStore r, Member TeamFeatureStore r, Member (Input Opts) r) => Local UserId -> Key -> Value -> Sem r ConversationCoverView
- ensureGuestLinksEnabled :: forall r. (Member (ErrorS 'GuestLinksDisabled) r, Member TeamFeatureStore r, Member (Input Opts) r) => Maybe TeamId -> Sem r ()
- getConversationGuestLinksStatus :: forall r. (Member ConversationStore r, Member (ErrorS 'ConvNotFound) r, Member (ErrorS 'ConvAccessDenied) r, Member (Input Opts) r, Member TeamFeatureStore r) => UserId -> ConvId -> Sem r (LockableFeature GuestLinksConfig)
- ensureConvAdmin :: (Member (ErrorS 'ConvAccessDenied) r, Member (ErrorS 'ConvNotFound) r) => [LocalMember] -> UserId -> Sem r ()
- getMLSSelfConversation :: forall r. (Member ConversationStore r, Member (Error InternalError) r, Member TinyLog r) => Local UserId -> Sem r Conversation
- getMLSSelfConversationWithError :: forall r. (Member ConversationStore r, Member (Error InternalError) r, Member (ErrorS 'MLSNotEnabled) r, Member (Input Env) r, Member TinyLog r) => Local UserId -> Sem r Conversation
- getMLSOne2OneConversationV5 :: (Member BrigAccess r, Member ConversationStore r, Member (Input Env) r, Member (Error FederationError) r, Member (Error InternalError) r, Member (ErrorS 'MLSNotEnabled) r, Member (ErrorS 'NotConnected) r, Member (ErrorS 'MLSFederatedOne2OneNotSupported) r, Member FederatorAccess r, Member TeamStore r, Member TinyLog r) => Local UserId -> Qualified UserId -> Sem r Conversation
- getMLSOne2OneConversationV6 :: (Member BrigAccess r, Member ConversationStore r, Member (Input Env) r, Member (Error FederationError) r, Member (Error InternalError) r, Member (ErrorS 'MLSNotEnabled) r, Member (ErrorS 'NotConnected) r, Member FederatorAccess r, Member TeamStore r, Member TinyLog r) => Local UserId -> Qualified UserId -> Sem r (MLSOne2OneConversation MLSPublicKey)
- getMLSOne2OneConversationInternal :: (Member BrigAccess r, Member ConversationStore r, Member (Input Env) r, Member (Error FederationError) r, Member (Error InternalError) r, Member (ErrorS 'MLSNotEnabled) r, Member (ErrorS 'NotConnected) r, Member FederatorAccess r, Member TeamStore r, Member TinyLog r) => Local UserId -> Qualified UserId -> Sem r Conversation
- getMLSOne2OneConversation :: (Member BrigAccess r, Member ConversationStore r, Member (Input Env) r, Member (Error FederationError) r, Member (Error InternalError) r, Member (ErrorS 'MLSNotEnabled) r, Member (ErrorS 'NotConnected) r, Member FederatorAccess r, Member TeamStore r, Member TinyLog r) => Local UserId -> Qualified UserId -> Maybe MLSPublicKeyFormat -> Sem r (MLSOne2OneConversation SomeKey)
- isMLSOne2OneEstablished :: (Member ConversationStore r, Member (Input Env) r, Member (Error FederationError) r, Member (Error InternalError) r, Member (ErrorS 'MLSNotEnabled) r, Member (ErrorS 'NotConnected) r, Member FederatorAccess r, Member TinyLog r) => Local UserId -> Qualified UserId -> Sem r Bool
Documentation
getBotConversation :: (Member ConversationStore r, Member (ErrorS 'ConvNotFound) r, Member (Input (Local ())) r) => BotId -> ConvId -> Sem r BotConvView Source #
getUnqualifiedConversation :: (Member ConversationStore r, Member (ErrorS 'ConvNotFound) r, Member (ErrorS 'ConvAccessDenied) r, Member (Error InternalError) r, Member TinyLog r) => Local UserId -> ConvId -> Sem r Conversation Source #
getConversation :: forall r. (Member ConversationStore r, Member (ErrorS 'ConvNotFound) r, Member (ErrorS 'ConvAccessDenied) r, Member (Error FederationError) r, Member (Error InternalError) r, Member FederatorAccess r, Member TinyLog r) => Local UserId -> Qualified ConvId -> Sem r Conversation Source #
getConversationRoles :: (Member ConversationStore r, Member (ErrorS 'ConvNotFound) r, Member (ErrorS 'ConvAccessDenied) r) => Local UserId -> ConvId -> Sem r ConversationRolesList Source #
conversationIdsPageFromUnqualified :: Member (ListItems LegacyPaging ConvId) r => Local UserId -> Maybe ConvId -> Maybe (Range 1 1000 Int32) -> Sem r (ConversationList ConvId) Source #
conversationIdsPageFromV2 :: forall p r. (p ~ CassandraPaging, (Member ConversationStore r, Member (Error InternalError) r, Member (Input Env) r, Member (ListItems p ConvId) r, Member (ListItems p (Remote ConvId)) r, Member TinyLog r)) => ListGlobalSelfConvs -> Local UserId -> GetPaginatedConversationIds -> Sem r ConvIdsPage Source #
Lists conversation ids for the logged in user in a paginated way.
Pagination requires an order, in this case the order is defined as:
- First all the local conversations are listed ordered by their id
- After local conversations, remote conversations are listed ordered
- lexicographically by their domain and then by their id.
FUTUREWORK: Move the body of this function to conversationIdsPageFrom
once
support for V2 is dropped.
conversationIdsPageFrom :: forall p r. (p ~ CassandraPaging, (Member ConversationStore r, Member (Error InternalError) r, Member (Input Env) r, Member (ListItems p ConvId) r, Member (ListItems p (Remote ConvId)) r, Member TinyLog r)) => Local UserId -> GetPaginatedConversationIds -> Sem r ConvIdsPage Source #
Lists conversation ids for the logged in user in a paginated way.
Pagination requires an order, in this case the order is defined as:
- First all the local conversations are listed ordered by their id
- After local conversations, remote conversations are listed ordered
- lexicographically by their domain and then by their id.
getConversations :: (Member (Error InternalError) r, Member (ListItems LegacyPaging ConvId) r, Member ConversationStore r, Member TinyLog r) => Local UserId -> Maybe (Range 1 32 (CommaSeparatedList ConvId)) -> Maybe ConvId -> Maybe (Range 1 500 Int32) -> Sem r (ConversationList Conversation) Source #
listConversations :: (Member ConversationStore r, Member (Error InternalError) r, Member FederatorAccess r, Member TinyLog r) => Local UserId -> ListConversations -> Sem r ConversationsResponse Source #
iterateConversations :: (Member (ListItems LegacyPaging ConvId) r, Member ConversationStore r) => Local UserId -> Range 1 500 Int32 -> ([Conversation] -> Sem r a) -> Sem r [a] Source #
getLocalSelf :: (Member ConversationStore r, Member MemberStore r) => Local UserId -> ConvId -> Sem r (Maybe Member) Source #
internalGetMember :: (Member ConversationStore r, Member (Input (Local ())) r, Member MemberStore r) => ConvId -> UserId -> Sem r (Maybe Member) Source #
getConversationMeta :: (Member ConversationStore r, Member (ErrorS 'ConvNotFound) r) => ConvId -> Sem r ConversationMetadata Source #
getConversationByReusableCode :: forall r. (Member BrigAccess r, Member CodeStore r, Member ConversationStore r, Member (ErrorS 'CodeNotFound) r, Member (ErrorS 'InvalidConversationPassword) r, Member (ErrorS 'ConvNotFound) r, Member (ErrorS 'ConvAccessDenied) r, Member (ErrorS 'GuestLinksDisabled) r, Member (ErrorS 'NotATeamMember) r, Member TeamStore r, Member TeamFeatureStore r, Member (Input Opts) r) => Local UserId -> Key -> Value -> Sem r ConversationCoverView Source #
ensureGuestLinksEnabled :: forall r. (Member (ErrorS 'GuestLinksDisabled) r, Member TeamFeatureStore r, Member (Input Opts) r) => Maybe TeamId -> Sem r () Source #
getConversationGuestLinksStatus :: forall r. (Member ConversationStore r, Member (ErrorS 'ConvNotFound) r, Member (ErrorS 'ConvAccessDenied) r, Member (Input Opts) r, Member TeamFeatureStore r) => UserId -> ConvId -> Sem r (LockableFeature GuestLinksConfig) Source #
ensureConvAdmin :: (Member (ErrorS 'ConvAccessDenied) r, Member (ErrorS 'ConvNotFound) r) => [LocalMember] -> UserId -> Sem r () Source #
getMLSSelfConversation :: forall r. (Member ConversationStore r, Member (Error InternalError) r, Member TinyLog r) => Local UserId -> Sem r Conversation Source #
Get an MLS self conversation. In case it does not exist, it is partially created in the database. The part that is not written is the epoch number; the number is inserted only upon the first commit. With this we avoid race conditions where two clients concurrently try to create or update the self conversation, where the only thing that can be updated is bumping the epoch number.
getMLSSelfConversationWithError :: forall r. (Member ConversationStore r, Member (Error InternalError) r, Member (ErrorS 'MLSNotEnabled) r, Member (Input Env) r, Member TinyLog r) => Local UserId -> Sem r Conversation Source #
The same as getMLSSelfConversation
, but it throws an error in case the
backend is not configured for MLS (the proxy for it being the existance of
the backend removal key).
getMLSOne2OneConversationV5 :: (Member BrigAccess r, Member ConversationStore r, Member (Input Env) r, Member (Error FederationError) r, Member (Error InternalError) r, Member (ErrorS 'MLSNotEnabled) r, Member (ErrorS 'NotConnected) r, Member (ErrorS 'MLSFederatedOne2OneNotSupported) r, Member FederatorAccess r, Member TeamStore r, Member TinyLog r) => Local UserId -> Qualified UserId -> Sem r Conversation Source #
Get an MLS 1-1 conversation. If not already existing, the conversation object is created on the fly, but not persisted. The conversation will only be stored in the database when its first commit arrives.
For the federated case, we do not make the assumption that the other backend uses the same function to calculate the conversation ID and corresponding group ID, however we do assume that the two backends agree on which of the two is responsible for hosting the conversation.
getMLSOne2OneConversationV6 :: (Member BrigAccess r, Member ConversationStore r, Member (Input Env) r, Member (Error FederationError) r, Member (Error InternalError) r, Member (ErrorS 'MLSNotEnabled) r, Member (ErrorS 'NotConnected) r, Member FederatorAccess r, Member TeamStore r, Member TinyLog r) => Local UserId -> Qualified UserId -> Sem r (MLSOne2OneConversation MLSPublicKey) Source #
getMLSOne2OneConversationInternal :: (Member BrigAccess r, Member ConversationStore r, Member (Input Env) r, Member (Error FederationError) r, Member (Error InternalError) r, Member (ErrorS 'MLSNotEnabled) r, Member (ErrorS 'NotConnected) r, Member FederatorAccess r, Member TeamStore r, Member TinyLog r) => Local UserId -> Qualified UserId -> Sem r Conversation Source #
getMLSOne2OneConversation :: (Member BrigAccess r, Member ConversationStore r, Member (Input Env) r, Member (Error FederationError) r, Member (Error InternalError) r, Member (ErrorS 'MLSNotEnabled) r, Member (ErrorS 'NotConnected) r, Member FederatorAccess r, Member TeamStore r, Member TinyLog r) => Local UserId -> Qualified UserId -> Maybe MLSPublicKeyFormat -> Sem r (MLSOne2OneConversation SomeKey) Source #
isMLSOne2OneEstablished :: (Member ConversationStore r, Member (Input Env) r, Member (Error FederationError) r, Member (Error InternalError) r, Member (ErrorS 'MLSNotEnabled) r, Member (ErrorS 'NotConnected) r, Member FederatorAccess r, Member TinyLog r) => Local UserId -> Qualified UserId -> Sem r Bool Source #
Check if an MLS 1-1 conversation has been established, namely if its epoch is non-zero. The conversation will only be stored in the database when its first commit arrives.
For the federated case, we do not make the assumption that the other backend uses the same function to calculate the conversation ID and corresponding group ID, however we do assume that the two backends agree on which of the two is responsible for hosting the conversation.