From 433cd505ee02977cf3ed2695f7d66f9f5c50212f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 28 Aug 2017 00:39:59 +0100 Subject: [PATCH] skip direct chats which either you or the target have left --- src/components/views/rooms/MemberInfo.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js index 4f7394fd91..6d38797a2d 100644 --- a/src/components/views/rooms/MemberInfo.js +++ b/src/components/views/rooms/MemberInfo.js @@ -620,7 +620,12 @@ module.exports = withMatrixClient(React.createClass({ const room = this.props.matrixClient.getRoom(roomId); if (room) { const me = room.getMember(this.props.matrixClient.credentials.userId); - if (me.membership === 'leave') continue; + // not a DM room if we have left it + if (!me.membership || me.membership === 'leave') continue; + // not a DM room if they have left it + const them = this.props.member; + if (!them.membership || them.membership === 'leave') continue; + const highlight = room.getUnreadNotificationCount('highlight') > 0 || me.membership === 'invite'; tiles.push(