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

@ -257,9 +257,7 @@ module.exports = React.createClass({
_startChat: function(addr) {
// Start the chat
createRoom().then(function(roomId) {
return Invite.inviteToRoom(roomId, addr);
})
createRoom({dmUserId: addr})
.catch(function(err) {
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {