mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Allow hs_url as param on mobile_register
This commit is contained in:
parent
a89f61a357
commit
0716434aa1
@ -961,9 +961,16 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||
view: Views.REGISTER,
|
||||
};
|
||||
|
||||
// Only honour params if they are all present, otherwise we reset
|
||||
// HS and IS URLs when switching to registration.
|
||||
if (params.client_secret && params.session_id && params.hs_url && params.is_url && params.sid) {
|
||||
if (isMobileRegistration && params.hs_url) {
|
||||
try {
|
||||
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(
|
||||
params.hs_url,
|
||||
params.is_url,
|
||||
|
Loading…
Reference in New Issue
Block a user