This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
components/views/dialogs/spotlight Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -103,12 +103,9 @@ function refIsForRecentlyViewed(ref: RefObject<HTMLElement>): boolean {
103103 return ref . current ?. id ?. startsWith ( "mx_SpotlightDialog_button_recentlyViewed_" ) === true ;
104104}
105105
106- function getRoomTypes ( showRooms : boolean , showSpaces : boolean ) : Set < RoomType | null > | null {
106+ function getRoomTypes ( showRooms : boolean , showSpaces : boolean ) : Set < RoomType | null > {
107107 const roomTypes = new Set < RoomType | null > ( ) ;
108108
109- // This is what servers not implementing MSC3827 are expecting
110- if ( showRooms && ! showSpaces ) return null ;
111-
112109 if ( showRooms ) roomTypes . add ( null ) ;
113110 if ( showSpaces ) roomTypes . add ( RoomType . Space ) ;
114111
Original file line number Diff line number Diff line change @@ -91,7 +91,9 @@ export const usePublicRoomDirectory = () => {
9191 if ( query || roomTypes ) {
9292 opts . filter = {
9393 "generic_search_term" : query ,
94- "org.matrix.msc3827.room_types" : roomTypes ? Array . from < RoomType | null > ( roomTypes ) : null ,
94+ "org.matrix.msc3827.room_types" : await MatrixClientPeg . get ( ) . doesServerSupportUnstableFeature (
95+ "org.matrix.msc3827" ,
96+ ) ? Array . from < RoomType | null > ( roomTypes ) : null ,
9597 } ;
9698 }
9799
You can’t perform that action at this time.
0 commit comments