Merge pull request #3984 from matrix-org/dbkr/rightpanel_verif_phase

Fix various races that prevented the right panel being in the right state for verifications
This commit is contained in:
David Baker 2020-01-29 18:03:27 +00:00 committed by GitHub
commit ac173e9d50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 2 deletions

View file

@ -36,7 +36,7 @@ const EncryptionPanel = ({verificationRequest, member, onClose}) => {
setRequest(verificationRequest);
}, [verificationRequest]);
const [phase, setPhase] = useState(undefined);
const [phase, setPhase] = useState(request.phase);
const changeHandler = useCallback(() => {
// handle transitions -> cancelled for mismatches which fire a modal instead of showing a card
if (request && request.cancelled && MISMATCHES.includes(request.cancellationCode)) {