Default to public room when creating room from room directory
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
58a5b7f154
commit
7fe40a0470
3 changed files with 9 additions and 5 deletions
|
@ -623,7 +623,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
break;
|
||||
}
|
||||
case 'view_create_room':
|
||||
this.createRoom();
|
||||
this.createRoom(payload.public);
|
||||
break;
|
||||
case 'view_create_group': {
|
||||
const CreateGroupDialog = sdk.getComponent("dialogs.CreateGroupDialog");
|
||||
|
@ -1012,9 +1012,9 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
}).close;
|
||||
}
|
||||
|
||||
private async createRoom() {
|
||||
private async createRoom(defaultPublic = false) {
|
||||
const CreateRoomDialog = sdk.getComponent('dialogs.CreateRoomDialog');
|
||||
const modal = Modal.createTrackedDialog('Create Room', '', CreateRoomDialog);
|
||||
const modal = Modal.createTrackedDialog('Create Room', '', CreateRoomDialog, { defaultPublic });
|
||||
|
||||
const [shouldCreate, opts] = await modal.finished;
|
||||
if (shouldCreate) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue