Handle THREEPID_IN_USE error

verto
David Baker 2015-08-04 14:49:01 +01:00
parent 69ac0bd368
commit 259d9dc3a2
1 changed files with 8 additions and 4 deletions

View File

@ -242,10 +242,14 @@ module.exports = {
});
self.setStep('stage_m.login.email.identity');
}, function(error) {
self.setState({
busy: false,
errorText: 'Unable to contact the given Home Server'
});
self.setStep('initial');
var newState = {busy: false};
if (error.errcode == 'THREEPID_IN_USE') {
self.onBadFields({email: self.FieldErrors.InUse});
} else {
newState.errorText = 'Unable to contact the given Home Server';
}
self.setState(newState);
});
break;
case 'm.login.recaptcha':