You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
Merge pull request #2971 from matrix-org/travis/wk/fallback_hs
Only expose the fallback_hs_url if the homeserver is the default homeserver
This commit is contained in:
@@ -203,9 +203,12 @@ export default React.createClass({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODO: TravisR - Remove this or put it somewhere else
|
|
||||||
getFallbackHsUrl: function() {
|
getFallbackHsUrl: function() {
|
||||||
|
if (this.props.serverConfig.isDefault) {
|
||||||
return this.props.config.fallback_hs_url;
|
return this.props.config.fallback_hs_url;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getServerProperties() {
|
getServerProperties() {
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ export class ValidatedServerConfig {
|
|||||||
|
|
||||||
isUrl: string;
|
isUrl: string;
|
||||||
identityEnabled: boolean;
|
identityEnabled: boolean;
|
||||||
|
|
||||||
|
isDefault: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class AutoDiscoveryUtils {
|
export default class AutoDiscoveryUtils {
|
||||||
@@ -99,6 +101,7 @@ export default class AutoDiscoveryUtils {
|
|||||||
hsNameIsDifferent: url.hostname !== preferredHomeserverName,
|
hsNameIsDifferent: url.hostname !== preferredHomeserverName,
|
||||||
isUrl: preferredIdentityUrl,
|
isUrl: preferredIdentityUrl,
|
||||||
identityEnabled: !SdkConfig.get()['disable_identity_server'],
|
identityEnabled: !SdkConfig.get()['disable_identity_server'],
|
||||||
|
isDefault: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user