Don't re-use parted rooms for DMs

This commit is contained in:
David Baker 2016-09-12 16:05:51 +01:00
parent 3fc657bce4
commit 6ffa7c23cd

View file

@ -248,10 +248,13 @@ module.exports = React.createClass({
for (let i = 0; i < dmRooms.length; i++) { for (let i = 0; i < dmRooms.length; i++) {
let room = MatrixClientPeg.get().getRoom(dmRooms[i]); let room = MatrixClientPeg.get().getRoom(dmRooms[i]);
if (room) { if (room) {
const me = room.getMember(MatrixClientPeg.get().credentials.userId);
if (me.membership == 'join') {
return room; return room;
} }
} }
} }
}
return null; return null;
}, },