Skip to content
Snippets Groups Projects
Commit 28c4a648 authored by David Baker's avatar David Baker
Browse files

Port roomlist fixes

parent e2c9afb2
No related branches found
No related tags found
No related merge requests found
......@@ -71,14 +71,12 @@ module.exports = {
if (actions && actions.tweaks && actions.tweaks.highlight) {
hl = 2;
}
if (actions.notify) {
// obviously this won't deep copy but this shouldn't be necessary
var amap = this.state.activityMap;
amap[room.roomId] = Math.max(amap[room.roomId] || 0, hl);
newState.activityMap = amap;
}
}
this.setState(newState);
},
......@@ -94,7 +92,12 @@ module.exports = {
},
getRoomList: function() {
return RoomListSorter.mostRecentActivityFirst(MatrixClientPeg.get().getRooms());
return RoomListSorter.mostRecentActivityFirst(
MatrixClientPeg.get().getRooms().filter(function(room) {
var member = room.getMember(MatrixClientPeg.get().credentials.userId);
return member && (member.membership == "join" || member.membership == "invite");
})
);
},
makeRoomTiles: function() {
......@@ -114,4 +117,3 @@ module.exports = {
});
},
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment