From 8f2c2b4088ceacbf8ac7f106a7ad4200c6d01e5c Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Thu, 10 Oct 2024 19:47:45 +0400 Subject: [PATCH] comment --- src/Simplex/Chat.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index f177dc615b..c122737b32 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -1787,7 +1787,9 @@ processChatCommand' vr = \case conn@PendingContactConnection {pccConnId} <- withFastStore' $ \db -> createDirectConnection db user connId cReq ConnJoined (incognitoProfile $> profileToSend) subMode chatV pqSup' -- TODO reuse connection record -- try to get PendingContactConnection by link (reuse connectPlan?); - -- if it exists, pass its connId to joinConnection to reuse key and avoid AUTH error; + -- connectPlan has to be modified to allow reuse of connection record + -- (e.g. connection reset to ConnNew on failure, and connectPlan having new branch for ConnNew); + -- if connection exists, pass its connId to joinConnection to reuse key and avoid AUTH error; -- insead of deleting, cleanup should mark connection in a way so that it's filtered out of chat list void (withAgent $ \a -> joinConnection a (aUserId user) connId True cReq dm pqSup' subMode) `catchChatError` \e -> do