Properly hide spaces from the room list

This commit is contained in:
Michael Telatynski 2021-04-22 09:41:07 +01:00
parent 28fa1cb44c
commit 60ef657f64

View file

@ -599,11 +599,7 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> {
private getPlausibleRooms(): Room[] { private getPlausibleRooms(): Room[] {
if (!this.matrixClient) return []; if (!this.matrixClient) return [];
let rooms = [ let rooms = this.matrixClient.getVisibleRooms().filter(r => VisibilityProvider.instance.isRoomVisible(r));
...this.matrixClient.getVisibleRooms(),
// also show space invites in the room list
...this.matrixClient.getRooms().filter(r => r.isSpaceRoom() && r.getMyMembership() === "invite"),
].filter(r => VisibilityProvider.instance.isRoomVisible(r));
if (this.prefilterConditions.length > 0) { if (this.prefilterConditions.length > 0) {
rooms = rooms.filter(r => { rooms = rooms.filter(r => {