refactor groups (#84)

* refactor groups

* disable chat test

* remove comments
This commit is contained in:
Evgeny Poberezkin authored and GitHub committed 2021-07-24 18:11:04 +01:00
1 parent 189cd7e09d
commit 488df1aa3c
4 files changed
+195 -167

No files matched your search

+3 -3
View File
@@ -292,9 +292,9 @@ getConnectionChatDirection st User {userId, userContactId} agentConnId =
Nothing -> throwError $ SEInternal "group member without connection"
Just groupMemberId -> uncurry (ReceivedGroupMessage c) <$> getGroupAndMember_ db groupMemberId c
ConnContact ->
case entityId of
Nothing -> pure $ ReceivedDMConnection c
Just contactId -> ReceivedDMContact <$> getContact_ db contactId c
ReceivedDirectMessage c <$> case entityId of
Nothing -> pure Nothing
Just contactId -> Just <$> getContact_ db contactId c
where
getConnection_ :: DB.Connection -> ExceptT StoreError IO Connection
getConnection_ db = ExceptT $ do