From 94775fd541a11b34eaec22b2a7cb84d6470dbf16 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Fri, 6 Dec 2024 12:28:38 +0000 Subject: [PATCH] more logs 2 --- src/Simplex/Chat/Store/Direct.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Simplex/Chat/Store/Direct.hs b/src/Simplex/Chat/Store/Direct.hs index d5396a0fef..279ac7524f 100644 --- a/src/Simplex/Chat/Store/Direct.hs +++ b/src/Simplex/Chat/Store/Direct.hs @@ -590,8 +590,12 @@ getContactByName db vr user localDisplayName = do getUserContacts :: DB.Connection -> VersionRangeChat -> User -> IO [Contact] getUserContacts db vr user@User {userId} = do contactIds <- map fromOnly <$> DB.query db "SELECT contact_id FROM contacts WHERE user_id = ? AND deleted = 0" (Only userId) + putStrLn $ "*** getUserContacts contactIds" <> show contactIds contacts <- rights <$> mapM (runExceptT . getContact db vr user) contactIds - pure $ filter (\Contact {activeConn} -> isJust activeConn) contacts + putStrLn $ "*** getUserContacts contacts" <> show contacts + r <- pure $ filter (\Contact {activeConn} -> isJust activeConn) contacts + putStrLn $ "*** getUserContacts filtered contacts" <> show r + pure r createOrUpdateContactRequest :: DB.Connection -> VersionRangeChat -> User -> Int64 -> InvitationId -> VersionRangeChat -> Profile -> Maybe XContactId -> PQSupport -> ExceptT StoreError IO ChatOrRequest createOrUpdateContactRequest db vr user@User {userId, userContactId} userContactLinkId invId (VersionRange minV maxV) Profile {displayName, fullName, image, contactLink, preferences} xContactId_ pqSup =