Merge pull request #3368 from matrix-org/travis/disable-msisdn

Disable MSISDN registration if the homeserver doesn't support it
This commit is contained in:
Travis Ralston 2019-09-02 11:25:17 -06:00 committed by GitHub
commit 71e13842b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -448,7 +448,8 @@ module.exports = createReactClass({
_showPhoneNumber() {
const threePidLogin = !SdkConfig.get().disable_3pid_login;
const haveIs = Boolean(this.props.serverConfig.isUrl);
if (!threePidLogin || !haveIs || !this._authStepIsUsed('m.login.msisdn')) {
const haveRequiredIs = this.props.serverRequiresIdServer && !haveIs;
if (!threePidLogin || haveRequiredIs || !this._authStepIsUsed('m.login.msisdn')) {
return false;
}
return true;