core: group link contact connecting(ed) events to avoid adding previews in ui (#1242)

* core: group link contact connecting(ed) events to avoid adding ui previews

* fix test

* refactor

* ios types

* android types

* type in bot
This commit is contained in:
JRoberts authored and GitHub committed 2022-10-23 21:18:15 +01:00
1 parent 341199d599
commit 15c1f9f9c8
11 files changed
+67 -47

No files matched your search

+5
View File
@@ -68,6 +68,7 @@ module Simplex.Chat.Store
getContactConnections,
getConnectionEntity,
getConnectionById,
getConnectionViaGroupLinkFlag,
getConnectionsContacts,
getGroupAndMember,
updateConnectionStatus,
@@ -1459,6 +1460,10 @@ getConnectionById db User {userId} connId = ExceptT $ do
|]
(userId, connId)
getConnectionViaGroupLinkFlag :: DB.Connection -> User -> Int64 -> IO (Maybe Bool)
getConnectionViaGroupLinkFlag db User {userId} connId =
maybeFirstRow fromOnly $ DB.query db "SELECT via_group_link FROM connections WHERE user_id = ? AND connection_id = ? LIMIT 1" (userId, connId)
getConnectionsContacts :: DB.Connection -> UserId -> [ConnId] -> IO [ContactRef]
getConnectionsContacts db userId agentConnIds = do
DB.execute_ db "DROP TABLE IF EXISTS temp.conn_ids"