Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2971 from matrix-org/travis/wk/fallback_hs
Browse files Browse the repository at this point in the history
Only expose the fallback_hs_url if the homeserver is the default homeserver
  • Loading branch information
turt2live authored May 16, 2019
2 parents 8c326bf + 34719b9 commit f75dc9c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/structures/MatrixChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 3 additions & 0 deletions src/utils/AutoDiscoveryUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export class ValidatedServerConfig {

isUrl: string;
identityEnabled: boolean;

isDefault: boolean;
}

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

0 comments on commit f75dc9c

Please sign in to comment.