use crypto.verification.request even when xsign is disabled
parent
191abb5b0d
commit
a7de575316
|
@ -1495,26 +1495,29 @@ export default createReactClass({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (SettingsStore.isFeatureEnabled("feature_cross_signing")) {
|
cli.on("crypto.verification.request", request => {
|
||||||
cli.on("crypto.verification.request", request => {
|
const isFlagOn = SettingsStore.isFeatureEnabled("feature_cross_signing");
|
||||||
if (request.pending) {
|
|
||||||
ToastStore.sharedInstance().addOrReplaceToast({
|
if (!isFlagOn && !request.channel.deviceId) {
|
||||||
key: 'verifreq_' + request.channel.transactionId,
|
request.cancel({code: "m.invalid_message", reason: "This client has cross-signing disabled"});
|
||||||
title: _t("Verification Request"),
|
return;
|
||||||
icon: "verification",
|
}
|
||||||
props: {request},
|
|
||||||
component: sdk.getComponent("toasts.VerificationRequestToast"),
|
if (request.pending) {
|
||||||
});
|
ToastStore.sharedInstance().addOrReplaceToast({
|
||||||
}
|
key: 'verifreq_' + request.channel.transactionId,
|
||||||
});
|
title: _t("Verification Request"),
|
||||||
} else {
|
icon: "verification",
|
||||||
cli.on("crypto.verification.start", (verifier) => {
|
props: {request},
|
||||||
const IncomingSasDialog = sdk.getComponent("views.dialogs.IncomingSasDialog");
|
component: sdk.getComponent("toasts.VerificationRequestToast"),
|
||||||
Modal.createTrackedDialog('Incoming Verification', '', IncomingSasDialog, {
|
});
|
||||||
verifier,
|
} else if (request.started) {
|
||||||
|
const VerificationRequestDialog = sdk.getComponent("views.dialogs.VerificationRequestDialog");
|
||||||
|
Modal.createTrackedDialog('Incoming Verification', '', VerificationRequestDialog, {
|
||||||
|
verificationRequest: request,
|
||||||
}, null, /* priority = */ false, /* static = */ true);
|
}, null, /* priority = */ false, /* static = */ true);
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
// Fire the tinter right on startup to ensure the default theme is applied
|
// Fire the tinter right on startup to ensure the default theme is applied
|
||||||
// A later sync can/will correct the tint to be the right value for the user
|
// A later sync can/will correct the tint to be the right value for the user
|
||||||
const colorScheme = SettingsStore.getValue("roomColor");
|
const colorScheme = SettingsStore.getValue("roomColor");
|
||||||
|
|
Loading…
Reference in New Issue