Merge pull request #3201 from matrix-org/travis/fix-deactivate
Use the state variable for the password when deactivatingpull/21833/head
commit
1c8226682a
|
@ -64,13 +64,13 @@ export default class DeactivateAccountDialog extends React.Component {
|
||||||
const auth = {
|
const auth = {
|
||||||
type: 'm.login.password',
|
type: 'm.login.password',
|
||||||
user: MatrixClientPeg.get().credentials.userId,
|
user: MatrixClientPeg.get().credentials.userId,
|
||||||
password: this._passwordField.value,
|
password: this.state.password,
|
||||||
};
|
};
|
||||||
await MatrixClientPeg.get().deactivateAccount(auth, this.state.shouldErase);
|
await MatrixClientPeg.get().deactivateAccount(auth, this.state.shouldErase);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
let errStr = _t('Unknown error');
|
let errStr = _t('Unknown error');
|
||||||
// https://matrix.org/jira/browse/SYN-744
|
// https://matrix.org/jira/browse/SYN-744
|
||||||
if (err.httpStatus == 401 || err.httpStatus == 403) {
|
if (err.httpStatus === 401 || err.httpStatus === 403) {
|
||||||
errStr = _t('Incorrect password');
|
errStr = _t('Incorrect password');
|
||||||
Velocity(this._passwordField, "callout.shake", 300);
|
Velocity(this._passwordField, "callout.shake", 300);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue