Update createRoom to support creating DM rooms

* Make ChatInviteDialog and MemberInfo createRoom use it
* Fix bug in setDMRoom
This commit is contained in:
David Baker 2016-09-09 19:25:00 +01:00
parent 8160613e01
commit 96fabe09d2
4 changed files with 38 additions and 23 deletions

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();