From 6ffa7c23cd2e27ca7c0d07dc5a74033c57bdc99b Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 12 Sep 2016 16:05:51 +0100 Subject: [PATCH] Don't re-use parted rooms for DMs --- src/components/views/dialogs/ChatInviteDialog.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/views/dialogs/ChatInviteDialog.js b/src/components/views/dialogs/ChatInviteDialog.js index e322127135..d63ae8c81e 100644 --- a/src/components/views/dialogs/ChatInviteDialog.js +++ b/src/components/views/dialogs/ChatInviteDialog.js @@ -248,7 +248,10 @@ module.exports = React.createClass({ for (let i = 0; i < dmRooms.length; i++) { let room = MatrixClientPeg.get().getRoom(dmRooms[i]); if (room) { - return room; + const me = room.getMember(MatrixClientPeg.get().credentials.userId); + if (me.membership == 'join') { + return room; + } } } }