From db1d3c091e041b607507fdf145cb41c6a92c46f5 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 27 Jan 2020 17:21:31 +0000 Subject: [PATCH] Error handle the no QR verif case better --- .../views/right_panel/VerificationPanel.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/views/right_panel/VerificationPanel.js b/src/components/views/right_panel/VerificationPanel.js index c1e84afc22..f6a26665d8 100644 --- a/src/components/views/right_panel/VerificationPanel.js +++ b/src/components/views/right_panel/VerificationPanel.js @@ -31,15 +31,22 @@ export default class VerificationPanel extends React.PureComponent { } renderQRPhase() { - const {member, request} = this.props; // type req: VerificationRequest + const {member, request} = this.props; // TODO change the button into a spinner when on click const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); const cli = MatrixClientPeg.get(); const crossSigningInfo = cli.getStoredCrossSigningForUser(request.otherUserId); if (!crossSigningInfo || !request.requestEvent || !request.requestEvent.getId()) { - // TODO handle this error case - return

request.requestEvent.getId()

; + // for whatever reason we can't generate a QR code, offer only SAS Verification + return
+

Verify by emoji

+

{_t("Verify by comparing unique emoji.")}

+ + + {_t("Verify by emoji")} + +
; } const myKeyId = cli.getCrossSigningId();