this code actually never fires, so remove it

and that's ok because createRoom will already mark a DM as such
on the inviter's side. So here we just handle the invitees side.
This commit is contained in:
Bruno Windels 2018-07-13 12:51:32 +02:00
parent 19387805ac
commit 6ff92ede8f

View file

@ -758,22 +758,6 @@ module.exports = React.createClass({
if (dmInviter) {
Rooms.setDMRoom(roomId, dmInviter);
return;
}
const invitedMembers = this.state.room.getMembersWithMembership("invite");
const joinedMembers = this.state.room.getMembersWithMembership("join");
// There must be one invited member and one joined member
if (invitedMembers.length !== 1 || joinedMembers.length !== 1) {
return;
}
// The user may have sent an invite with is_direct sent
const other = invitedMembers[0];
if (other && !!other.getDirectChatInviter()) {
Rooms.setDMRoom(roomId, other.userId);
return;
}
},