core: fix associated agent user for recreated connections (#4771)

* core: fix associated user for recreated connections

* fix test for connection recreation
This commit is contained in:
Diogo
2024-08-27 22:12:55 +01:00
committed by GitHub
parent e582d2d742
commit 05e7f35037
2 changed files with 40 additions and 29 deletions
+1 -1
View File
@@ -1709,7 +1709,7 @@ processChatCommand' vr = \case
pure conn'
recreateConn user conn@PendingContactConnection {customUserProfileId} newUser = do
subMode <- chatReadVar subscriptionMode
(agConnId, cReq) <- withAgent $ \a -> createConnection a (aUserId user) True SCMInvitation Nothing IKPQOn subMode
(agConnId, cReq) <- withAgent $ \a -> createConnection a (aUserId newUser) True SCMInvitation Nothing IKPQOn subMode
conn' <- withFastStore' $ \db -> do
deleteConnectionRecord db user connId
forM_ customUserProfileId $ \profileId ->