Merge pull request #458 from matrix-org/dbkr/createdoom_dm

Update createRoom to support creating DM rooms
This commit is contained in:
David Baker
2016-09-12 18:29:43 +01:00
committed by GitHub
4 changed files with 38 additions and 23 deletions
+1 -5
View File
@@ -421,11 +421,7 @@ module.exports = React.createClass({
onNewDMClick: function() {
this.setState({ updating: this.state.updating + 1 });
createRoom({
createOpts: {
invite: [this.props.member.userId],
},
}).finally(() => {
createRoom({dmUserId: this.props.member.userId}).finally(() => {
this.props.onFinished();
this.setState({ updating: this.state.updating - 1 });
}).done();