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
|
@ -79,7 +79,16 @@ const CreateSubspaceDialog: React.FC<IProps> = ({ space, onAddExistingSpaceClick
|
|||
}
|
||||
|
||||
try {
|
||||
await createSpace(name, joinRule === JoinRule.Public, alias, topic, avatar, {}, { parentSpace, joinRule });
|
||||
await createSpace(
|
||||
space.client,
|
||||
name,
|
||||
joinRule === JoinRule.Public,
|
||||
alias,
|
||||
topic,
|
||||
avatar,
|
||||
{},
|
||||
{ parentSpace, joinRule },
|
||||
);
|
||||
|
||||
onFinished(true);
|
||||
} catch (e) {
|
||||
|
|
|
@ -28,6 +28,7 @@ import ErrorDialog, { extractErrorMessageFromError } from "./ErrorDialog";
|
|||
import QuestionDialog from "./QuestionDialog";
|
||||
import BaseDialog from "./BaseDialog";
|
||||
import EditableText from "../elements/EditableText";
|
||||
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
||||
|
||||
interface IProps {
|
||||
title: string;
|
||||
|
@ -71,7 +72,7 @@ export default class SetEmailDialog extends React.Component<IProps, IState> {
|
|||
});
|
||||
return;
|
||||
}
|
||||
this.addThreepid = new AddThreepid();
|
||||
this.addThreepid = new AddThreepid(MatrixClientPeg.get());
|
||||
this.addThreepid.addEmailAddress(emailAddress).then(
|
||||
() => {
|
||||
Modal.createDialog(QuestionDialog, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue