Add invite selection to create room dialog
This commit is contained in:
parent
ed52cdf6df
commit
b53e710d20
5 changed files with 129 additions and 6 deletions
|
@ -21,17 +21,23 @@ var MatrixClientPeg = require("../../MatrixClientPeg");
|
|||
|
||||
module.exports = {
|
||||
onCreateRoom: function() {
|
||||
var room_name = this.refs.name_textbox.getName();
|
||||
console.log("Create room clicked. Name: " + room_name);
|
||||
|
||||
var options = {
|
||||
preset: this.refs.presets.getPreset(),
|
||||
};
|
||||
var options = {};
|
||||
|
||||
var room_name = this.getName();
|
||||
if (room_name) {
|
||||
options.name = room_name;
|
||||
}
|
||||
|
||||
var preset = this.getPreset();
|
||||
if (preset) {
|
||||
options.preset = preset;
|
||||
}
|
||||
|
||||
var invited_users = this.getInvitedUsers();
|
||||
if (invited_users) {
|
||||
options.invite = invited_users;
|
||||
}
|
||||
|
||||
var cli = MatrixClientPeg.get();
|
||||
if (!cli) {
|
||||
// TODO: Error.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue