mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 02:35:48 +03:00
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.
This commit is contained in:
parent
2483337e89
commit
512bd4b0b2
1 changed files with 7 additions and 0 deletions
|
@ -23,6 +23,7 @@ import {RIGHT_PANEL_PHASES} from "../../../stores/RightPanelStorePhases";
|
|||
import {userLabelForEventRoom} from "../../../utils/KeyVerificationStateObserver";
|
||||
import dis from "../../../dispatcher";
|
||||
import ToastStore from "../../../stores/ToastStore";
|
||||
import Modal from "../../../Modal";
|
||||
|
||||
export default class VerificationRequestToast extends React.PureComponent {
|
||||
constructor(props) {
|
||||
|
@ -79,6 +80,12 @@ export default class VerificationRequestToast extends React.PureComponent {
|
|||
phase: RIGHT_PANEL_PHASES.EncryptionPanel,
|
||||
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) {
|
||||
console.error(err.message);
|
||||
|
|
Loading…
Reference in a new issue