You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +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:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user