diff --git a/src/components/views/messages/MKeyVerificationConclusion.js b/src/components/views/messages/MKeyVerificationConclusion.js index fb83eda803..6dce9dcd48 100644 --- a/src/components/views/messages/MKeyVerificationConclusion.js +++ b/src/components/views/messages/MKeyVerificationConclusion.js @@ -48,12 +48,14 @@ export default class MKeyVerificationConclusion extends React.Component { render() { const {mxEvent} = this.props; const request = mxEvent.verificationRequest; + + if (!request) { + return null; + } + const client = MatrixClientPeg.get(); const myUserId = client.getUserId(); - if (!request) { - return
This is a verification conclusion tile without a request.
; - } let title; @@ -67,6 +69,8 @@ export default class MKeyVerificationConclusion extends React.Component { title = _t("%(name)s cancelled verifying", {name: getNameForEventRoom(request.otherUserId, mxEvent)}); } + } else { + title = `request conclusion tile with phase ${request.phase}`; } if (title) { diff --git a/src/components/views/messages/MKeyVerificationRequest.js b/src/components/views/messages/MKeyVerificationRequest.js index 0aa2188116..ea99435d85 100644 --- a/src/components/views/messages/MKeyVerificationRequest.js +++ b/src/components/views/messages/MKeyVerificationRequest.js @@ -99,13 +99,14 @@ export default class MKeyVerificationRequest extends React.Component { const {mxEvent} = this.props; const request = mxEvent.verificationRequest; + if (!request) { + return null; + } + let title; let subtitle; let stateNode; - if (!request) { - returnThis is a verification request tile without a request.
; - } if (request.ready || request.started || request.cancelled) { let stateLabel;