Pass around MatrixClients instead of using MatrixClientPeg (#11000)
This commit is contained in:
parent
aa5a2e1363
commit
938aefc51c
28 changed files with 176 additions and 141 deletions
|
@ -181,7 +181,7 @@ export default class EmailAddresses extends React.Component<IProps, IState> {
|
|||
return;
|
||||
}
|
||||
|
||||
const task = new AddThreepid();
|
||||
const task = new AddThreepid(MatrixClientPeg.get());
|
||||
this.setState({ verifying: true, continueDisabled: true, addTask: task });
|
||||
|
||||
task.addEmailAddress(email)
|
||||
|
|
|
@ -182,7 +182,7 @@ export default class PhoneNumbers extends React.Component<IProps, IState> {
|
|||
const phoneNumber = this.state.newPhoneNumber;
|
||||
const phoneCountry = this.state.phoneCountry;
|
||||
|
||||
const task = new AddThreepid();
|
||||
const task = new AddThreepid(MatrixClientPeg.get());
|
||||
this.setState({ verifying: true, continueDisabled: true, addTask: task });
|
||||
|
||||
task.addMsisdn(phoneCountry, phoneNumber)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue