mirror of https://github.com/vector-im/riot-web
show to_device verification in dialog, not right panel
this also makes it work again, as the VerificationPanel doens't know how to deal with requests that are already in PHASE_STARTED, which was breaking verifying your own devices.pull/21833/head
parent
2483337e89
commit
512bd4b0b2
|
@ -23,6 +23,7 @@ import {RIGHT_PANEL_PHASES} from "../../../stores/RightPanelStorePhases";
|
||||||
import {userLabelForEventRoom} from "../../../utils/KeyVerificationStateObserver";
|
import {userLabelForEventRoom} from "../../../utils/KeyVerificationStateObserver";
|
||||||
import dis from "../../../dispatcher";
|
import dis from "../../../dispatcher";
|
||||||
import ToastStore from "../../../stores/ToastStore";
|
import ToastStore from "../../../stores/ToastStore";
|
||||||
|
import Modal from "../../../Modal";
|
||||||
|
|
||||||
export default class VerificationRequestToast extends React.PureComponent {
|
export default class VerificationRequestToast extends React.PureComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -79,6 +80,12 @@ export default class VerificationRequestToast extends React.PureComponent {
|
||||||
phase: RIGHT_PANEL_PHASES.EncryptionPanel,
|
phase: RIGHT_PANEL_PHASES.EncryptionPanel,
|
||||||
refireParams: {verificationRequest: request},
|
refireParams: {verificationRequest: request},
|
||||||
});
|
});
|
||||||
|
} else if (request.channel.deviceId && request.verifier) {
|
||||||
|
// show to_device verifications in dialog still
|
||||||
|
const IncomingSasDialog = sdk.getComponent("views.dialogs.IncomingSasDialog");
|
||||||
|
Modal.createTrackedDialog('Incoming Verification', '', IncomingSasDialog, {
|
||||||
|
verifier: request.verifier,
|
||||||
|
}, null, /* priority = */ false, /* static = */ true);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err.message);
|
console.error(err.message);
|
||||||
|
|
Loading…
Reference in New Issue