core, ui: confirm before connecting a call answered without e2e encryption (#7647)

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
spaced4ndy
2026-10-05 09:45:57 +01:00
committed by GitHub
co-authored by Evgeny Poberezkin
parent b79223fe5c
commit 86671a1699
4 changed files with 86 additions and 25 deletions
+1 -1
View File
@@ -3053,7 +3053,7 @@ processAgentMessageConn cxt user@User {userId} entity gks_ corrId agentConnId ag
| callVersion `isCompatible` callVR -> do
let sharedKey = callMediaKey callVersion callId <$> callDhPubKey <*> localDhPrivKey
callState' = CallOfferReceived {localCallType, peerCallType = callType, peerCallSession = rtcSession, sharedKey}
askConfirmation = encryptedCall localCallType && not (encryptedCall callType)
askConfirmation = encryptedCall localCallType && isNothing sharedKey
toView CEvtCallOffer {user, contact = ct, callType, offer = rtcSession, sharedKey, askConfirmation}
pure (Just call {callState = callState'}, Just . ACIContent SMDSnd $ CISndCall CISCallAccepted 0)
| otherwise -> do