Merge pull request #2971 from matrix-org/travis/wk/fallback_hs

Only expose the fallback_hs_url if the homeserver is the default homeserver
pull/21833/head
Travis Ralston 2019-05-16 12:46:52 -06:00 committed by GitHub
commit f75dc9c804
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -203,9 +203,12 @@ export default React.createClass({
};
},
// TODO: TravisR - Remove this or put it somewhere else
getFallbackHsUrl: function() {
return this.props.config.fallback_hs_url;
if (this.props.serverConfig.isDefault) {
return this.props.config.fallback_hs_url;
} else {
return null;
}
},
getServerProperties() {

View File

@ -26,6 +26,8 @@ export class ValidatedServerConfig {
isUrl: string;
identityEnabled: boolean;
isDefault: boolean;
}
export default class AutoDiscoveryUtils {
@ -99,6 +101,7 @@ export default class AutoDiscoveryUtils {
hsNameIsDifferent: url.hostname !== preferredHomeserverName,
isUrl: preferredIdentityUrl,
identityEnabled: !SdkConfig.get()['disable_identity_server'],
isDefault: false,
});
}
}