core: fix member contact request not showing incognito correctly (#6174)

* core: fix member contact request not showing incognito correctly

* comment
This commit is contained in:
spaced4ndy authored and GitHub committed 2025-08-11 13:22:30 +01:00
1 parent 95ab629e92
commit c94e3301ad
3 files changed
+111

No files matched your search

+3
View File
@@ -2634,6 +2634,9 @@ processChatCommand vr nm = \case
withInvitationLock "connect" (strEncode cReq) $ do
subMode <- chatReadVar subscriptionMode
case activeConn of
-- Nothing is legacy branch for exisiting contacts without prepared connection;
-- for new member contacts connection is prepared immediately (on xGrpDirectInv),
-- so incognito profile can be attached to it and be visible in UI before accepting
Nothing -> joinNewConn subMode
Just conn@Connection {connStatus} -> case connStatus of
ConnPrepared -> joinPreparedConn subMode conn
+4
View File
@@ -3105,8 +3105,10 @@ processAgentMessageConn vr user@User {userId} corrId agentConnId agentMessage =
securityCodeChanged mCt'
createItems mCt' m
| otherwise = do
acId <- withAgent $ \a -> prepareConnectionToJoin a (aUserId user) True connReq PQSupportOff
mCt' <- withStore $ \db -> do
updateMemberContactInvited db user mCt groupDirectInv
void $ liftIO $ createMemberContactConn db user acId Nothing g mConn ConnPrepared mContactId subMode
getContact db vr user mContactId
securityCodeChanged mCt'
createInternalChatItem user (CDDirectRcv mCt') (CIRcvDirectEvent $ RDEGroupInvLinkReceived gp) Nothing
@@ -3123,8 +3125,10 @@ processAgentMessageConn vr user@User {userId} corrId agentConnId agentMessage =
createInternalChatItem user (CDDirectSnd mCt) CIChatBanner (Just epochStart)
createItems mCt m'
| otherwise = do
acId <- withAgent $ \a -> prepareConnectionToJoin a (aUserId user) True connReq PQSupportOff
(mCt, m') <- withStore $ \db -> do
(mContactId, m') <- liftIO $ createMemberContactInvited db user g m groupDirectInv
void $ liftIO $ createMemberContactConn db user acId Nothing g mConn ConnPrepared mContactId subMode
mCt <- getContact db vr user mContactId
pure (mCt, m')
createInternalChatItem user (CDDirectSnd mCt) CIChatBanner (Just epochStart)