diff --git a/src/components/structures/auth/Registration.js b/src/components/structures/auth/Registration.js index 028a519fa9a1..b12dc5d3b301 100644 --- a/src/components/structures/auth/Registration.js +++ b/src/components/structures/auth/Registration.js @@ -91,7 +91,18 @@ module.exports = React.createClass({ if (newProps.serverConfig.hsUrl === this.props.serverConfig.hsUrl && newProps.serverConfig.isUrl === this.props.serverConfig.isUrl) return; + const serverType = ServerType.getTypeFromServerConfig(newProps.serverConfig); this._replaceClient(newProps.serverConfig); + + // Handle cases where the user enters "https://matrix.org" for their server + // from the advanced option - we should default to FREE at that point. + if (serverType !== this.state.serverType) { + // Reset the phase to default phase for the server type. + this.setState({ + serverType, + phase: this.getDefaultPhaseForServerType(serverType), + }); + } }, getDefaultPhaseForServerType(type) {