mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 12:58:53 +03:00
Allow hs_url as param on mobile_register
This commit is contained in:
parent
a89f61a357
commit
0716434aa1
1 changed files with 10 additions and 3 deletions
|
@ -961,9 +961,16 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
view: Views.REGISTER,
|
view: Views.REGISTER,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Only honour params if they are all present, otherwise we reset
|
if (isMobileRegistration && params.hs_url) {
|
||||||
// HS and IS URLs when switching to registration.
|
try {
|
||||||
if (params.client_secret && params.session_id && params.hs_url && params.is_url && params.sid) {
|
const config = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(params.hs_url);
|
||||||
|
newState.serverConfig = config;
|
||||||
|
} catch (err) {
|
||||||
|
logger.warn("Failed to load hs_url param:", params.hs_url);
|
||||||
|
}
|
||||||
|
} else if (params.client_secret && params.session_id && params.hs_url && params.is_url && params.sid) {
|
||||||
|
// Only honour params if they are all present, otherwise we reset
|
||||||
|
// HS and IS URLs when switching to registration.
|
||||||
newState.serverConfig = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(
|
newState.serverConfig = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(
|
||||||
params.hs_url,
|
params.hs_url,
|
||||||
params.is_url,
|
params.is_url,
|
||||||
|
|
Loading…
Reference in a new issue