Error handle the no QR verif case better
This commit is contained in:
parent
ca5d4d88a2
commit
db1d3c091e
1 changed files with 10 additions and 3 deletions
|
@ -31,15 +31,22 @@ export default class VerificationPanel extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderQRPhase() {
|
renderQRPhase() {
|
||||||
const {member, request} = this.props; // type req: VerificationRequest
|
const {member, request} = this.props;
|
||||||
// TODO change the button into a spinner when on click
|
// TODO change the button into a spinner when on click
|
||||||
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||||
|
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
const crossSigningInfo = cli.getStoredCrossSigningForUser(request.otherUserId);
|
const crossSigningInfo = cli.getStoredCrossSigningForUser(request.otherUserId);
|
||||||
if (!crossSigningInfo || !request.requestEvent || !request.requestEvent.getId()) {
|
if (!crossSigningInfo || !request.requestEvent || !request.requestEvent.getId()) {
|
||||||
// TODO handle this error case
|
// for whatever reason we can't generate a QR code, offer only SAS Verification
|
||||||
return <p>request.requestEvent.getId()</p>;
|
return <div className="mx_UserInfo_container">
|
||||||
|
<h3>Verify by emoji</h3>
|
||||||
|
<p>{_t("Verify by comparing unique emoji.")}</p>
|
||||||
|
|
||||||
|
<AccessibleButton kind="primary" className="mx_UserInfo_verify" onClick={this._startSAS}>
|
||||||
|
{_t("Verify by emoji")}
|
||||||
|
</AccessibleButton>
|
||||||
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const myKeyId = cli.getCrossSigningId();
|
const myKeyId = cli.getCrossSigningId();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue