open a to_device request in a modal instead of the right panel 1st room
parent
049a6d2064
commit
1a5bed5a10
|
@ -78,28 +78,28 @@ export default class VerificationRequestToast extends React.PureComponent {
|
||||||
// no room id for to_device requests
|
// no room id for to_device requests
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
try {
|
try {
|
||||||
|
await request.accept();
|
||||||
if (request.channel.roomId) {
|
if (request.channel.roomId) {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'view_room',
|
action: 'view_room',
|
||||||
room_id: request.channel.roomId,
|
room_id: request.channel.roomId,
|
||||||
should_peek: false,
|
should_peek: false,
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'view_room',
|
action: "set_right_panel_phase",
|
||||||
room_id: cli.getRooms()[0].roomId,
|
phase: RIGHT_PANEL_PHASES.EncryptionPanel,
|
||||||
should_peek: false,
|
refireParams: {
|
||||||
|
verificationRequest: request,
|
||||||
|
member: cli.getUser(request.otherUserId),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
await request.accept();
|
const VerificationRequestDialog = sdk.getComponent("views.dialogs.VerificationRequestDialog");
|
||||||
dis.dispatch({
|
Modal.createTrackedDialog('Incoming Verification', '', VerificationRequestDialog, {
|
||||||
action: "set_right_panel_phase",
|
|
||||||
phase: RIGHT_PANEL_PHASES.EncryptionPanel,
|
|
||||||
refireParams: {
|
|
||||||
verificationRequest: request,
|
verificationRequest: request,
|
||||||
member: cli.getUser(request.otherUserId),
|
}, null, /* priority = */ false, /* static = */ true);
|
||||||
},
|
}
|
||||||
});
|
|
||||||
// } else if (request.channel.deviceId && request.verifier) {
|
// } else if (request.channel.deviceId && request.verifier) {
|
||||||
// // show to_device verifications in dialog still
|
// // show to_device verifications in dialog still
|
||||||
// const IncomingSasDialog = sdk.getComponent("views.dialogs.IncomingSasDialog");
|
// const IncomingSasDialog = sdk.getComponent("views.dialogs.IncomingSasDialog");
|
||||||
|
|
Loading…
Reference in New Issue