Merge pull request #3934 from matrix-org/travis/cross-signing-info

Add null check for cross-signing info in verification panel
This commit is contained in:
Travis Ralston 2020-01-24 09:49:30 -07:00 committed by GitHub
commit 1986f13275
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,12 +49,13 @@ export default class VerificationPanel extends React.PureComponent {
Verify by emoji
</AccessibleButton>;
if (request.requestEvent && request.requestEvent.getId()) {
const crossSigningInfo = MatrixClientPeg.get().getStoredCrossSigningForUser(request.otherUserId);
const myKeyId = MatrixClientPeg.get().getCrossSigningId();
if (request.requestEvent && request.requestEvent.getId() && crossSigningInfo) {
const qrCodeKeys = [
[MatrixClientPeg.get().getDeviceId(), MatrixClientPeg.get().getDeviceEd25519Key()],
[MatrixClientPeg.get().getCrossSigningId(), MatrixClientPeg.get().getCrossSigningId()],
[myKeyId, myKeyId],
];
const crossSigningInfo = MatrixClientPeg.get().getStoredCrossSigningForUser(request.otherUserId);
const qrCode = <VerificationQRCode
keyholderUserId={MatrixClientPeg.get().getUserId()}
requestEventId={request.requestEvent.getId()}