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
No known key found for this signature in database
GPG key ID: 3F879DA5AD802A5E

View file

@ -620,7 +620,12 @@ module.exports = withMatrixClient(React.createClass({
const room = this.props.matrixClient.getRoom(roomId); const room = this.props.matrixClient.getRoom(roomId);
if (room) { if (room) {
const me = room.getMember(this.props.matrixClient.credentials.userId); 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'; const highlight = room.getUnreadNotificationCount('highlight') > 0 || me.membership === 'invite';
tiles.push( tiles.push(