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
disable ilag
This commit is contained in:
@@ -40,25 +40,29 @@ export const SAFE_LOCALPART_REGEX = /^[a-z0-9=_\-./]+$/;
|
||||
*/
|
||||
export async function startAnyRegistrationFlow(options) {
|
||||
if (options === undefined) options = {};
|
||||
const flows = await _getRegistrationFlows();
|
||||
// look for an ILAG compatible flow. We define this as one
|
||||
// which has only dummy or recaptcha flows. In practice it
|
||||
// would support any stage InteractiveAuth supports, just not
|
||||
// ones like email & msisdn which require the user to supply
|
||||
// the relevant details in advance. We err on the side of
|
||||
// caution though.
|
||||
const hasIlagFlow = flows.some((flow) => {
|
||||
return flow.stages.every((stage) => {
|
||||
return ['m.login.dummy', 'm.login.recaptcha', 'm.login.terms'].includes(stage);
|
||||
});
|
||||
});
|
||||
|
||||
if (hasIlagFlow) {
|
||||
dis.dispatch({
|
||||
action: 'view_set_mxid',
|
||||
go_home_on_cancel: options.go_home_on_cancel,
|
||||
});
|
||||
} else {
|
||||
// XXX: ILAG is disabled for now,
|
||||
// see https://github.com/vector-im/riot-web/issues/8222
|
||||
|
||||
// const flows = await _getRegistrationFlows();
|
||||
// const hasIlagFlow = flows.some((flow) => {
|
||||
// return flow.stages.every((stage) => {
|
||||
// return ['m.login.dummy', 'm.login.recaptcha', 'm.login.terms'].includes(stage);
|
||||
// });
|
||||
// });
|
||||
|
||||
// if (hasIlagFlow) {
|
||||
// dis.dispatch({
|
||||
// action: 'view_set_mxid',
|
||||
// go_home_on_cancel: options.go_home_on_cancel,
|
||||
// });
|
||||
//} else {
|
||||
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
||||
Modal.createTrackedDialog('Registration required', '', QuestionDialog, {
|
||||
title: _t("Registration Required"),
|
||||
@@ -72,7 +76,7 @@ export async function startAnyRegistrationFlow(options) {
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
async function _getRegistrationFlows() {
|
||||
|
||||
Reference in New Issue
Block a user