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 {
103
103
return ref . current ?. id ?. startsWith ( "mx_SpotlightDialog_button_recentlyViewed_" ) === true ;
104
104
}
105
105
106
- function getRoomTypes ( showRooms : boolean , showSpaces : boolean ) : Set < RoomType | null > | null {
106
+ function getRoomTypes ( showRooms : boolean , showSpaces : boolean ) : Set < RoomType | null > {
107
107
const roomTypes = new Set < RoomType | null > ( ) ;
108
108
109
- // This is what servers not implementing MSC3827 are expecting
110
- if ( showRooms && ! showSpaces ) return null ;
111
-
112
109
if ( showRooms ) roomTypes . add ( null ) ;
113
110
if ( showSpaces ) roomTypes . add ( RoomType . Space ) ;
114
111
Original file line number Diff line number Diff line change @@ -91,7 +91,9 @@ export const usePublicRoomDirectory = () => {
91
91
if ( query || roomTypes ) {
92
92
opts . filter = {
93
93
"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 ,
95
97
} ;
96
98
}
97
99
You can’t perform that action at this time.
0 commit comments