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

Add null check for cross-signing info in verification panel
pull/21833/head
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
1 changed files with 4 additions and 3 deletions

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()}