| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Simplex.Chat.Library.Internal
Documentation
maxMsgReactions :: Int Source #
maxRcvMentions :: Int Source #
maxSndMentions :: Int Source #
withChatLock :: Text -> CM a -> CM a Source #
withEntityLock :: Text -> ChatLockEntity -> CM a -> CM a Source #
withInvitationLock :: Text -> ByteString -> CM a -> CM a Source #
withConnectionLock :: Text -> Int64 -> CM a -> CM a Source #
withUserContactLock :: Text -> Int64 -> CM a -> CM a Source #
withContactRequestLock :: Text -> Int64 -> CM a -> CM a Source #
withFileLock :: Text -> Int64 -> CM a -> CM a Source #
useServerCfgs :: forall (p :: ProtocolType). UserProtocol p => SProtocolType p -> RandomAgentServers -> [(Text, ServerOperator)] -> [UserServer p] -> NonEmpty (ServerCfg p) Source #
sndCITimed_ :: Bool -> Maybe (Maybe Int) -> Maybe Int -> CM (Maybe CITimed) Source #
toggleNtf :: GroupMember -> Bool -> CM () Source #
prepareGroupMsg :: Connection -> User -> GroupInfo -> Maybe MsgScope -> MsgContent -> Map MemberName MsgMention -> Maybe ChatItemId -> Maybe CIForwardedFrom -> Maybe FileInvitation -> Maybe CITimed -> Bool -> ExceptT StoreError IO (ChatMsgEvent 'Json, Maybe (CIQuote 'CTGroup)) Source #
updatedMentionNames :: MsgContent -> Maybe MarkdownList -> Map MemberName CIMention -> (MsgContent, Maybe MarkdownList, Map MemberName CIMention) Source #
getCIMentions :: Connection -> User -> GroupInfo -> Maybe MarkdownList -> Map MemberName GroupMemberId -> ExceptT StoreError IO (Map MemberName CIMention) Source #
getRcvCIMentions :: Connection -> User -> GroupInfo -> Maybe MarkdownList -> Map MemberName MsgMention -> IO (Map MemberName CIMention) Source #
uniqueMsgMentions :: Int -> Map MemberName MsgMention -> [ContactName] -> Map MemberName MsgMention Source #
getMessageMentions :: Connection -> User -> GroupId -> Text -> IO (Map MemberName GroupMemberId) Source #
msgContentTexts :: MsgContent -> (Text, Maybe MarkdownList) Source #
ciContentTexts :: forall (d :: MsgDirection). CIContent d -> (Text, Maybe MarkdownList) Source #
quoteContent :: forall (d :: MsgDirection). MsgContent -> MsgContent -> Maybe (CIFile d) -> MsgContent Source #
prohibitedGroupContent :: GroupInfo -> GroupMember -> Maybe GroupChatScopeInfo -> MsgContent -> Maybe MarkdownList -> Maybe f -> Bool -> Maybe GroupFeature Source #
prohibitedSimplexLinks :: GroupInfo -> GroupMember -> Maybe MarkdownList -> Bool Source #
ftIsSimplexLink :: FormattedText -> Bool Source #
roundedFDCount :: Int -> Int Source #
xftpSndFileTransfer_ :: User -> CryptoFile -> Integer -> Int -> Maybe ContactOrGroup -> CM (FileInvitation, CIFile 'MDSnd, FileTransferMeta) Source #
xftpSndFileRedirect :: User -> FileTransferId -> ValidFileDescription 'FRecipient -> CM FileTransferMeta Source #
cancelFilesInProgress :: User -> [CIFileInfo] -> CM () Source #
deleteFilesLocally :: [CIFileInfo] -> CM () Source #
deleteDirectCIs :: User -> Contact -> [CChatItem 'CTDirect] -> CM [ChatItemDeletion] Source #
deleteGroupCIs :: User -> GroupInfo -> Maybe GroupChatScopeInfo -> [CChatItem 'CTGroup] -> Maybe GroupMember -> UTCTime -> CM [ChatItemDeletion] Source #
deleteGroupMemberCIs :: forall (d :: MsgDirection). MsgDirectionI d => User -> GroupInfo -> GroupMember -> GroupMember -> SMsgDirection d -> CM () Source #
deleteGroupMembersCIs :: User -> GroupInfo -> [GroupMember] -> GroupMember -> CM () Source #
deleteGroupMemberCIs_ :: forall (d :: MsgDirection). MsgDirectionI d => Connection -> User -> GroupInfo -> GroupMember -> GroupMember -> SMsgDirection d -> UTCTime -> IO [CIFileInfo] Source #
deleteLocalCIs :: User -> NoteFolder -> [CChatItem 'CTLocal] -> Bool -> Bool -> CM ChatResponse Source #
deleteCIFiles :: User -> [CIFileInfo] -> CM () Source #
markDirectCIsDeleted :: User -> Contact -> [CChatItem 'CTDirect] -> UTCTime -> CM [ChatItemDeletion] Source #
markGroupCIsDeleted :: User -> GroupInfo -> Maybe GroupChatScopeInfo -> [CChatItem 'CTGroup] -> Maybe GroupMember -> UTCTime -> CM [ChatItemDeletion] Source #
markGroupMemberCIsDeleted :: User -> GroupInfo -> GroupMember -> GroupMember -> CM () Source #
markGroupMembersCIsDeleted :: User -> GroupInfo -> [GroupMember] -> GroupMember -> CM () Source #
markGroupMemberCIsDeleted_ :: Connection -> User -> GroupInfo -> GroupMember -> GroupMember -> UTCTime -> IO [CIFileInfo] Source #
groupDeletion :: forall (d :: MsgDirection). MsgDirectionI d => SMsgDirection d -> GroupInfo -> Maybe GroupChatScopeInfo -> ChatItem 'CTGroup d -> Maybe (ChatItem 'CTGroup d) -> ChatItemDeletion Source #
contactDeletion :: forall (d :: MsgDirection). MsgDirectionI d => SMsgDirection d -> Contact -> ChatItem 'CTDirect d -> Maybe (ChatItem 'CTDirect d) -> ChatItemDeletion Source #
updateCallItemStatus :: User -> Contact -> Call -> WebRTCCallStatus -> Maybe MessageId -> CM () Source #
updateDirectChatItemView :: User -> Contact -> ChatItemId -> ACIContent -> Bool -> Bool -> Maybe CITimed -> Maybe MessageId -> CM () Source #
callStatusItemContent :: User -> Contact -> ChatItemId -> WebRTCCallStatus -> CM (Maybe ACIContent) Source #
toFSFilePath :: FilePath -> CM' FilePath Source #
receiveFile' :: User -> RcvFileTransfer -> Bool -> Maybe Bool -> Maybe FilePath -> CM ChatResponse Source #
receiveFileEvt' :: User -> RcvFileTransfer -> Bool -> Maybe Bool -> Maybe FilePath -> CM ChatEvent Source #
rctFileCancelled :: ChatError -> Bool Source #
acceptFileReceive :: User -> RcvFileTransfer -> Bool -> Maybe Bool -> Maybe FilePath -> CM AChatItem Source #
receiveViaCompleteFD :: User -> FileTransferId -> RcvFileDescr -> Bool -> Maybe CryptoFileArgs -> CM () Source #
cleanupACIFile :: AChatItem -> CM () Source #
getKnownAgentServers :: forall (p :: ProtocolType). (ProtocolTypeI p, UserProtocol p) => SProtocolType p -> User -> CM (NonEmpty (ServerCfg p)) Source #
protoServer' :: forall (p :: ProtocolType). ServerCfg p -> ProtocolServer p Source #
getNetworkConfig :: CM' NetworkConfig Source #
resetRcvCIFileStatus :: User -> FileTransferId -> CIFileStatus 'MDRcv -> CM (Maybe AChatItem) Source #
receiveViaURI :: User -> FileDescriptionURI -> CryptoFile -> CM RcvFileTransfer Source #
startReceivingFile :: User -> FileTransferId -> CM () Source #
getRcvFilePath :: FileTransferId -> Maybe FilePath -> String -> Bool -> CM FilePath Source #
acceptContactRequest :: NetworkRequestMode -> User -> UserContactRequest -> IncognitoEnabled -> CM (Contact, Connection, SndQueueSecured) Source #
acceptContactRequestAsync :: User -> Int64 -> Contact -> UserContactRequest -> Maybe IncognitoProfile -> CM Contact Source #
acceptGroupJoinRequestAsync :: User -> Int64 -> GroupInfo -> InvitationId -> VersionRangeChat -> Profile -> Maybe XContactId -> Maybe SharedMsgId -> GroupAcceptance -> GroupMemberRole -> Maybe IncognitoProfile -> CM GroupMember Source #
acceptGroupJoinSendRejectAsync :: User -> Int64 -> GroupInfo -> InvitationId -> VersionRangeChat -> Profile -> Maybe XContactId -> GroupRejectionReason -> CM GroupMember Source #
acceptBusinessJoinRequestAsync :: User -> Int64 -> GroupInfo -> GroupMember -> UserContactRequest -> CM (GroupInfo, GroupMember) Source #
introduceToModerators :: VersionRangeChat -> User -> GroupInfo -> GroupMember -> CM () Source #
introduceToAll :: VersionRangeChat -> User -> GroupInfo -> GroupMember -> CM () Source #
introduceToRemaining :: VersionRangeChat -> User -> GroupInfo -> GroupMember -> CM () Source #
shouldIntroduce :: GroupMember -> ByteString -> GroupMember -> Bool Source #
introduceMember :: User -> GroupInfo -> GroupMember -> [GroupMember] -> Maybe MsgScope -> CM () Source #
memberInfo :: GroupInfo -> GroupMember -> MemberInfo Source #
redactedMemberProfile :: Bool -> Profile -> Profile Source #
sendHistory :: User -> GroupInfo -> GroupMember -> CM () Source #
splitFileDescr :: Int -> RcvFileDescrText -> NonEmpty FileDescr Source #
encodeShortLinkData :: ToJSON a => a -> UserLinkData Source #
decodeShortLinkData :: forall a (c :: ConnectionMode). FromJSON a => ConnLinkData c -> IO (Maybe a) Source #
shortenShortLink' :: forall (m :: ConnectionMode). ConnShortLink m -> CM (ConnShortLink m) Source #
shortenCreatedLink :: forall (m :: ConnectionMode). CreatedConnLink m -> CM (CreatedConnLink m) Source #
deleteGroupLink_ :: User -> GroupInfo -> Connection -> CM () Source #
startProximateTimedItemThread :: User -> (ChatRef, ChatItemId) -> UTCTime -> CM () Source #
startTimedItemThread :: User -> (ChatRef, ChatItemId) -> UTCTime -> CM () Source #
deleteTimedItem :: User -> (ChatRef, ChatItemId) -> UTCTime -> CM () Source #
startUpdatedTimedItemThread :: forall (c :: ChatType) (d :: MsgDirection). User -> ChatRef -> ChatItem c d -> ChatItem c d -> CM () Source #
metaBrokerTs :: MsgMeta -> UTCTime Source #
createContactPQSndItem :: User -> Contact -> Connection -> PQEncryption -> CM (Contact, Connection) Source #
updateContactPQRcv :: User -> Contact -> Connection -> PQEncryption -> CM (Contact, Connection) Source #
updateMemberChatVRange :: GroupMember -> Connection -> VersionRangeChat -> CM (GroupMember, Connection) Source #
parseFileDescription :: forall (p :: FileParty). FilePartyI p => Text -> CM (ValidFileDescription p) Source #
sendDirectFileInline :: User -> Contact -> FileTransferMeta -> SharedMsgId -> CM () Source #
sendMemberFileInline :: GroupMember -> Connection -> FileTransferMeta -> SharedMsgId -> CM () Source #
sendFileInline_ :: FileTransferMeta -> SharedMsgId -> (ChatMsgEvent 'Binary -> CM (SndMessage, Int64)) -> CM Int64 Source #
parseChatMessage :: Connection -> ByteString -> CM (ChatMessage 'Json) Source #
getGroupRecipients :: VersionRangeChat -> User -> GroupInfo -> Maybe GroupChatScopeInfo -> VersionChat -> CM [GroupMember] Source #
mkLocalGroupChatScope :: GroupInfo -> CM (GroupInfo, Maybe GroupChatScopeInfo) Source #
mkGroupChatScope :: GroupInfo -> GroupMember -> CM (GroupInfo, GroupMember, Maybe GroupChatScopeInfo) Source #
mkGetMessageChatScope :: VersionRangeChat -> User -> GroupInfo -> GroupMember -> MsgContent -> Maybe MsgScope -> CM (GroupInfo, GroupMember, Maybe GroupChatScopeInfo) Source #
appendFileChunk :: RcvFileTransfer -> Integer -> ByteString -> Bool -> CM () Source #
getFileHandle :: Int64 -> FilePath -> (ChatController -> TVar (Map Int64 Handle)) -> IOMode -> CM Handle Source #
isFileActive :: Int64 -> (ChatController -> TVar (Map Int64 Handle)) -> CM Bool Source #
cancelRcvFileTransfer :: User -> RcvFileTransfer -> CM () Source #
cancelSndFile :: User -> FileTransferMeta -> [SndFileTransfer] -> Bool -> CM () Source #
cancelSndFileTransfer :: User -> SndFileTransfer -> Bool -> CM () Source #
closeFileHandle :: Int64 -> (ChatController -> TVar (Map Int64 Handle)) -> CM' () Source #
deleteMembersConnections :: User -> [GroupMember] -> CM () Source #
deleteMembersConnections' :: User -> [GroupMember] -> Bool -> CM () Source #
deleteMemberConnection :: GroupMember -> CM () Source #
deleteMemberConnection' :: GroupMember -> Bool -> CM () Source #
deleteOrUpdateMemberRecord :: User -> GroupInfo -> GroupMember -> CM GroupInfo Source #
deleteOrUpdateMemberRecordIO :: Connection -> User -> GroupInfo -> GroupMember -> IO GroupInfo Source #
updateMemberRecordDeleted :: User -> GroupInfo -> GroupMember -> GroupMemberStatus -> CM GroupInfo Source #
deleteSupportChatIfExists :: Connection -> User -> GroupInfo -> GroupMember -> IO (GroupInfo, GroupMember) Source #
sendDirectContactMessages :: forall (e :: MsgEncoding). MsgEncodingI e => User -> Contact -> NonEmpty (ChatMsgEvent e) -> CM [Either ChatError SndMessage] Source #
sendDirectContactMessages' :: forall (e :: MsgEncoding). MsgEncodingI e => User -> Contact -> NonEmpty (ChatMsgEvent e) -> CM [Either ChatError SndMessage] Source #
sendDirectContactMessage :: forall (e :: MsgEncoding). MsgEncodingI e => User -> Contact -> ChatMsgEvent e -> CM (SndMessage, Int64) Source #
contactSendConn_ :: Contact -> Either ChatError Connection Source #
sendDirectMemberMessage :: forall (e :: MsgEncoding). MsgEncodingI e => Connection -> ChatMsgEvent e -> GroupId -> CM (SndMessage, Int64, PQEncryption) Source #
sendDirectMessage_ :: forall (e :: MsgEncoding). MsgEncodingI e => Connection -> ChatMsgEvent e -> ConnOrGroupId -> CM (SndMessage, Int64, PQEncryption) Source #
createSndMessage :: forall (e :: MsgEncoding). MsgEncodingI e => ChatMsgEvent e -> ConnOrGroupId -> CM SndMessage Source #
createSndMessages :: forall (e :: MsgEncoding) t. (MsgEncodingI e, Traversable t) => t (ConnOrGroupId, ChatMsgEvent e) -> CM' (t (Either ChatError SndMessage)) Source #
sendGroupMemberMessages :: forall (e :: MsgEncoding). MsgEncodingI e => User -> Connection -> NonEmpty (ChatMsgEvent e) -> GroupId -> CM () Source #
batchSendConnMessages :: User -> Connection -> MsgFlags -> NonEmpty SndMessage -> CM ([Either ChatError SndMessage], Maybe PQEncryption) Source #
batchSendConnMessagesB :: User -> Connection -> MsgFlags -> NonEmpty (Either ChatError SndMessage) -> CM ([Either ChatError SndMessage], Maybe PQEncryption) Source #
batchSndMessagesJSON :: NonEmpty (Either ChatError SndMessage) -> [Either ChatError MsgBatch] Source #
encodeConnInfo :: forall (e :: MsgEncoding). MsgEncodingI e => ChatMsgEvent e -> CM ByteString Source #
encodeConnInfoPQ :: forall (e :: MsgEncoding). MsgEncodingI e => PQSupport -> VersionChat -> ChatMsgEvent e -> CM ByteString Source #
deliverMessage :: forall (e :: MsgEncoding). Connection -> CMEventTag e -> MsgBody -> MessageId -> CM (Int64, PQEncryption) Source #
deliverMessage' :: Connection -> MsgFlags -> MsgBody -> MessageId -> CM (Int64, PQEncryption) Source #
type ChatMsgReq = (Connection, MsgFlags, (ValueOrRef MsgBody, [MessageId])) Source #
deliverMessages :: NonEmpty ChatMsgReq -> CM (NonEmpty (Either ChatError ([Int64], PQEncryption))) Source #
deliverMessagesB :: NonEmpty (Either ChatError ChatMsgReq) -> CM (NonEmpty (Either ChatError ([Int64], PQEncryption))) Source #
sendGroupMessage :: forall (e :: MsgEncoding). MsgEncodingI e => User -> GroupInfo -> Maybe GroupChatScope -> [GroupMember] -> ChatMsgEvent e -> CM SndMessage Source #
sendGroupMessage' :: forall (e :: MsgEncoding). MsgEncodingI e => User -> GroupInfo -> [GroupMember] -> ChatMsgEvent e -> CM SndMessage Source #
sendGroupMessages :: forall (e :: MsgEncoding). MsgEncodingI e => User -> GroupInfo -> Maybe GroupChatScope -> [GroupMember] -> NonEmpty (ChatMsgEvent e) -> CM (NonEmpty (Either ChatError SndMessage), GroupSndResult) Source #
data GroupSndResult Source #
Constructors
| GroupSndResult | |
Fields
| |
sendGroupMessages_ :: forall (e :: MsgEncoding). MsgEncodingI e => User -> GroupInfo -> [GroupMember] -> NonEmpty (ChatMsgEvent e) -> CM (NonEmpty (Either ChatError SndMessage), GroupSndResult) Source #
data MemberSendAction Source #
Constructors
| MSASend Connection | |
| MSASendBatched Connection | |
| MSAPending | |
| MSAForwarded |
memberSendAction :: forall (e :: MsgEncoding). GroupInfo -> NonEmpty (ChatMsgEvent e) -> [GroupMember] -> GroupMember -> Maybe MemberSendAction Source #
readyMemberConn :: GroupMember -> Maybe (GroupMemberId, Connection) Source #
sendGroupMemberMessage :: forall (e :: MsgEncoding). MsgEncodingI e => GroupInfo -> GroupMember -> ChatMsgEvent e -> CM () Source #
sendPendingGroupMessages :: User -> GroupMember -> Connection -> CM () Source #
saveDirectRcvMSG :: forall (e :: MsgEncoding). MsgEncodingI e => Connection -> MsgMeta -> MsgBody -> ChatMessage e -> CM (Connection, RcvMessage) Source #
saveGroupRcvMsg :: forall (e :: MsgEncoding). MsgEncodingI e => User -> GroupId -> GroupMember -> Connection -> MsgMeta -> MsgBody -> ChatMessage e -> CM (GroupMember, Connection, RcvMessage) Source #
saveGroupFwdRcvMsg :: forall (e :: MsgEncoding). MsgEncodingI e => User -> GroupInfo -> GroupMember -> GroupMember -> MsgBody -> ChatMessage e -> UTCTime -> CM (Maybe RcvMessage) Source #
saveSndChatItem :: forall (c :: ChatType). ChatTypeI c => User -> ChatDirection c 'MDSnd -> SndMessage -> CIContent 'MDSnd -> CM (ChatItem c 'MDSnd) Source #
saveSndChatItem' :: forall (c :: ChatType). ChatTypeI c => User -> ChatDirection c 'MDSnd -> SndMessage -> CIContent 'MDSnd -> Maybe (CIFile 'MDSnd) -> Maybe (CIQuote c) -> Maybe CIForwardedFrom -> Maybe CITimed -> Bool -> CM (ChatItem c 'MDSnd) Source #
data NewSndChatItemData (c :: ChatType) Source #
Constructors
| NewSndChatItemData | |
Fields
| |
saveSndChatItems :: forall (c :: ChatType). ChatTypeI c => User -> ChatDirection c 'MDSnd -> [Either ChatError (NewSndChatItemData c)] -> Maybe CITimed -> Bool -> CM [Either ChatError (ChatItem c 'MDSnd)] Source #
saveRcvChatItemNoParse :: forall (c :: ChatType). (ChatTypeI c, ChatTypeQuotable c) => User -> ChatDirection c 'MDRcv -> RcvMessage -> UTCTime -> CIContent 'MDRcv -> CM (ChatItem c 'MDRcv, ChatInfo c) Source #
saveRcvChatItem :: forall (c :: ChatType). (ChatTypeI c, ChatTypeQuotable c) => User -> ChatDirection c 'MDRcv -> RcvMessage -> UTCTime -> (CIContent 'MDRcv, (Text, Maybe MarkdownList)) -> CM (ChatItem c 'MDRcv, ChatInfo c) Source #
ciContentNoParse :: CIContent 'MDRcv -> (CIContent 'MDRcv, (Text, Maybe MarkdownList)) Source #
saveRcvChatItem' :: forall (c :: ChatType). (ChatTypeI c, ChatTypeQuotable c) => User -> ChatDirection c 'MDRcv -> RcvMessage -> Maybe SharedMsgId -> UTCTime -> (CIContent 'MDRcv, (Text, Maybe MarkdownList)) -> Maybe (CIFile 'MDRcv) -> Maybe CITimed -> Bool -> Map MemberName MsgMention -> CM (ChatItem c 'MDRcv, ChatInfo c) Source #
mkChatItem :: forall (c :: ChatType) (d :: MsgDirection). (ChatTypeI c, MsgDirectionI d) => ChatDirection c d -> ShowGroupAsSender -> ChatItemId -> CIContent d -> Maybe (CIFile d) -> Maybe (CIQuote c) -> Maybe SharedMsgId -> Maybe CIForwardedFrom -> Maybe CITimed -> Bool -> Bool -> ChatItemTs -> Maybe GroupMemberId -> UTCTime -> ChatItem c d Source #
mkChatItem_ :: forall (c :: ChatType) (d :: MsgDirection). (ChatTypeI c, MsgDirectionI d) => ChatDirection c d -> ShowGroupAsSender -> ChatItemId -> CIContent d -> (Text, Maybe MarkdownList) -> Maybe (CIFile d) -> Maybe (CIQuote c) -> Maybe SharedMsgId -> Maybe CIForwardedFrom -> Maybe CITimed -> Bool -> Bool -> ChatItemTs -> Maybe GroupMemberId -> UTCTime -> ChatItem c d Source #
createAgentConnectionAsync :: forall (c :: ConnectionMode). ConnectionModeI c => User -> CommandFunction -> Bool -> SConnectionMode c -> SubscriptionMode -> CM (CommandId, ConnId) Source #
joinAgentConnectionAsync :: forall (c :: ConnectionMode). User -> Bool -> ConnectionRequestUri c -> ConnInfo -> SubscriptionMode -> CM (CommandId, ConnId) Source #
allowAgentConnectionAsync :: forall (e :: MsgEncoding). MsgEncodingI e => User -> Connection -> ConfirmationId -> ChatMsgEvent e -> CM () Source #
agentAcceptContactAsync :: forall (e :: MsgEncoding). MsgEncodingI e => User -> Bool -> InvitationId -> ChatMsgEvent e -> SubscriptionMode -> PQSupport -> VersionChat -> CM (CommandId, ConnId) Source #
deleteAgentConnectionAsync :: ConnId -> CM () Source #
deleteAgentConnectionAsync' :: ConnId -> Bool -> CM () Source #
deleteAgentConnectionsAsync :: [ConnId] -> CM () Source #
deleteAgentConnectionsAsync' :: [ConnId] -> Bool -> CM () Source #
agentXFTPDeleteRcvFile :: RcvFileId -> FileTransferId -> CM () Source #
agentXFTPDeleteRcvFiles :: [(XFTPRcvFile, FileTransferId)] -> CM' () Source #
agentXFTPDeleteSndFileRemote :: User -> XFTPSndFile -> FileTransferId -> CM' () Source #
agentXFTPDeleteSndFilesRemote :: User -> [(XFTPSndFile, FileTransferId)] -> CM' () Source #
connRequestPQEncryption :: forall (c :: ConnectionMode). ConnectionRequestUri c -> Maybe PQEncryption Source #
type FeatureContent a (d :: MsgDirection) = ChatFeature -> a -> Maybe Int -> CIContent d Source #
createFeatureItems :: forall (d :: MsgDirection). MsgDirectionI d => User -> Contact -> Contact -> (Contact -> ChatDirection 'CTDirect d) -> FeatureContent PrefEnabled d -> FeatureContent FeatureAllowed d -> (forall (f :: ChatFeature). ContactUserPreference (FeaturePreference f) -> FeaturePreference f) -> CM' () Source #
createContactsFeatureItems :: forall (d :: MsgDirection). MsgDirectionI d => User -> [(Contact, Contact)] -> (Contact -> ChatDirection 'CTDirect d) -> FeatureContent PrefEnabled d -> FeatureContent FeatureAllowed d -> (forall (f :: ChatFeature). ContactUserPreference (FeaturePreference f) -> FeaturePreference f) -> CM' () Source #
createGroupFeatureChangedItems :: forall (d :: MsgDirection). MsgDirectionI d => User -> ChatDirection 'CTGroup d -> (GroupFeature -> GroupPreference -> Maybe Int -> Maybe GroupMemberRole -> CIContent d) -> GroupInfo -> GroupInfo -> CM () Source #
sameGroupProfileInfo :: GroupProfile -> GroupProfile -> Bool Source #
createGroupFeatureItems :: forall (d :: MsgDirection). MsgDirectionI d => User -> ChatDirection 'CTGroup d -> (GroupFeature -> GroupPreference -> Maybe Int -> Maybe GroupMemberRole -> CIContent d) -> GroupInfo -> CM () Source #
createGroupFeatureItems_ :: forall (d :: MsgDirection). MsgDirectionI d => User -> ChatDirection 'CTGroup d -> ShowGroupAsSender -> (GroupFeature -> GroupPreference -> Maybe Int -> Maybe GroupMemberRole -> CIContent d) -> GroupInfo -> CM [AChatItem] Source #
createInternalChatItem :: forall (c :: ChatType) (d :: MsgDirection). (ChatTypeI c, MsgDirectionI d) => User -> ChatDirection c d -> CIContent d -> Maybe UTCTime -> CM () Source #
createChatItem :: forall (c :: ChatType) (d :: MsgDirection). (ChatTypeI c, MsgDirectionI d) => User -> ChatDirection c d -> ShowGroupAsSender -> CIContent d -> Maybe SharedMsgId -> Maybe UTCTime -> CM AChatItem Source #
createChatItems :: forall (c :: ChatType) (d :: MsgDirection). (ChatTypeI c, MsgDirectionI d) => User -> Maybe UTCTime -> [(ChatDirection c d, ShowGroupAsSender, [(CIContent d, Maybe SharedMsgId)])] -> CM' [Either ChatError AChatItem] Source #
memberAttentionChange :: Int -> Maybe UTCTime -> GroupMember -> GroupChatScopeInfo -> MemberAttention Source #
createLocalChatItems :: User -> ChatDirection 'CTLocal 'MDSnd -> NonEmpty (CIContent 'MDSnd, Maybe (CIFile 'MDSnd), Maybe CIForwardedFrom, (Text, Maybe MarkdownList)) -> UTCTime -> CM [ChatItem 'CTLocal 'MDSnd] Source #
withUser' :: (User -> CM ChatResponse) -> CM ChatResponse Source #
withUser :: (User -> CM ChatResponse) -> CM ChatResponse Source #
withUser_ :: CM ChatResponse -> CM ChatResponse Source #
withUserId' :: UserId -> (User -> CM ChatResponse) -> CM ChatResponse Source #
withUserId :: UserId -> (User -> CM ChatResponse) -> CM ChatResponse Source #
checkSameUser :: UserId -> User -> CM () Source #
chatStarted :: CM' Bool Source #
timeItToView :: String -> CM' a -> CM' a Source #
epochStart :: UTCTime Source #