Merge pull request #6122 from matrix-org/t3chguy/fix/rs5414

Fix all DMs wrongly appearing in room list when `m.direct` is changed
This commit is contained in:
Michael Telatynski
2021-06-01 15:42:47 +01:00
committed by GitHub
+4 -2
View File
@@ -426,8 +426,10 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> {
return; // don't do anything on rooms that aren't visible return; // don't do anything on rooms that aren't visible
} }
if (cause === RoomUpdateCause.NewRoom && !this.prefilterConditions.every(c => c.isVisible(room))) { if ((cause === RoomUpdateCause.NewRoom || cause === RoomUpdateCause.PossibleTagChange) &&
return; // don't do anything on new rooms which ought not to be shown !this.prefilterConditions.every(c => c.isVisible(room))
) {
return; // don't do anything on new/moved rooms which ought not to be shown
} }
const shouldUpdate = await this.algorithm.handleRoomUpdate(room, cause); const shouldUpdate = await this.algorithm.handleRoomUpdate(room, cause);