change name to Field, no_federate to switch

also construct room create options in dialog,
instead of MatrixChat, as we'll have more to come
This commit is contained in:
Bruno Windels 2019-09-20 17:39:46 +02:00
parent 351a3ebd67
commit 157a3388a5
2 changed files with 66 additions and 27 deletions

View file

@ -962,11 +962,8 @@ export default createReactClass({
const CreateRoomDialog = sdk.getComponent('dialogs.CreateRoomDialog');
const modal = Modal.createTrackedDialog('Create Room', '', CreateRoomDialog);
const [shouldCreate, name, noFederate] = await modal.finished;
const [shouldCreate, createOpts] = await modal.finished;
if (shouldCreate) {
const createOpts = {};
if (name) createOpts.name = name;
if (noFederate) createOpts.creation_content = {'m.federate': false};
createRoom({createOpts}).done();
}
},