@@ -238,16 +238,16 @@ def _count_public_rooms_txn(txn: LoggingTransaction) -> int:
238238 if (
239239 not self .config .experimental .msc3827_enabled
240240 or not search_filter
241- or search_filter .get ("room_type " , None ) is None
241+ or search_filter .get ("room_types " , None ) is None
242242 ):
243243 where_clause = "AND room_type IS NULL"
244244 elif (
245245 self .config .experimental .msc3827_enabled
246246 and search_filter
247- and search_filter .get ("room_type " , None )
247+ and search_filter .get ("room_types " , None )
248248 ):
249249 clause , args = self ._construct_room_type_where_clause (
250- search_filter ["room_type " ]
250+ search_filter ["room_types " ]
251251 )
252252 where_clause = f" AND { clause } "
253253 query_args += args
@@ -406,16 +406,16 @@ async def get_largest_public_rooms(
406406 if (
407407 not self .config .experimental .msc3827_enabled
408408 or not search_filter
409- or search_filter .get ("room_type " , None ) is None
409+ or search_filter .get ("room_types " , None ) is None
410410 ):
411411 where_clauses .append ("room_type IS NULL" )
412412 elif (
413413 self .config .experimental .msc3827_enabled
414414 and search_filter
415- and search_filter .get ("room_type " , None )
415+ and search_filter .get ("room_types " , None )
416416 ):
417417 clause , args = self ._construct_room_type_where_clause (
418- search_filter ["room_type " ]
418+ search_filter ["room_types " ]
419419 )
420420 where_clauses .append (clause )
421421 query_args += args
0 commit comments