Update MSC3827 implementation to not change the default behaviour (#8936)
This commit is contained in:
parent
3c14d93237
commit
68c94c6400
2 changed files with 4 additions and 5 deletions
|
@ -103,12 +103,9 @@ function refIsForRecentlyViewed(ref: RefObject<HTMLElement>): boolean {
|
|||
return ref.current?.id?.startsWith("mx_SpotlightDialog_button_recentlyViewed_") === true;
|
||||
}
|
||||
|
||||
function getRoomTypes(showRooms: boolean, showSpaces: boolean): Set<RoomType | null> | null {
|
||||
function getRoomTypes(showRooms: boolean, showSpaces: boolean): Set<RoomType | null> {
|
||||
const roomTypes = new Set<RoomType | null>();
|
||||
|
||||
// This is what servers not implementing MSC3827 are expecting
|
||||
if (showRooms && !showSpaces) return null;
|
||||
|
||||
if (showRooms) roomTypes.add(null);
|
||||
if (showSpaces) roomTypes.add(RoomType.Space);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue