1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-17 17:42:41 +03:00

skip direct chats which either you or the target have left

This commit is contained in:
Michael Telatynski
2017-08-28 00:39:59 +01:00
parent b644751ca1
commit 433cd505ee

View File

@@ -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(