From df26840d9e3a6c9ce276f78eef33ef679d5b34e9 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 15 Jul 2019 23:07:59 +0100 Subject: [PATCH] ChatCreateOrReuse show only rooms both you and the other party still in Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/dialogs/ChatCreateOrReuseDialog.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/views/dialogs/ChatCreateOrReuseDialog.js b/src/components/views/dialogs/ChatCreateOrReuseDialog.js index 3171c2db39..b8e5b7d0a4 100644 --- a/src/components/views/dialogs/ChatCreateOrReuseDialog.js +++ b/src/components/views/dialogs/ChatCreateOrReuseDialog.js @@ -52,7 +52,12 @@ export default class ChatCreateOrReuseDialog extends React.Component { const tiles = []; for (const roomId of dmRooms) { const room = client.getRoom(roomId); - if (room) { + if (room && room.getMyMembership() === "join") { + const member = room.getMember(this.props.userId); + if (!member || member.membership !== "join") { + continue; + } + const isInvite = room.getMyMembership() === "invite"; const highlight = room.getUnreadNotificationCount('highlight') > 0 || isInvite; tiles.push(