Merge pull request #456 from matrix-org/dbkr/dm_rooms_correct_section

Don't always show DM rooms in Direct Messages
pull/21833/head
David Baker 2016-09-09 17:35:02 +01:00 committed by GitHub
commit 9cff4d59ca
1 changed files with 4 additions and 4 deletions

View File

@ -229,10 +229,6 @@ module.exports = React.createClass({
else if (HIDE_CONFERENCE_CHANS && Rooms.isConfCallRoom(room, me, self.props.ConferenceHandler)) {
// skip past this room & don't put it in any lists
}
else if (dmRoomMap.getUserIdForRoomId(room.roomId)) {
// "Direct Message" rooms
s.lists["im.vector.fake.direct"].push(room);
}
else if (me.membership == "join" || me.membership === "ban" ||
(me.membership === "leave" && me.events.member.getSender() !== me.events.member.getStateKey()))
{
@ -246,6 +242,10 @@ module.exports = React.createClass({
s.lists[tagNames[i]].push(room);
}
}
else if (dmRoomMap.getUserIdForRoomId(room.roomId)) {
// "Direct Message" rooms (that we're still in and that aren't otherwise tagged)
s.lists["im.vector.fake.direct"].push(room);
}
else {
s.lists["im.vector.fake.recent"].push(room);
}