@@ -59,8 +59,6 @@ def __init__(self, hs: "HomeServer"):
5959        self .state_store  =  self .storage .state 
6060        self .auth  =  hs .get_auth ()
6161
62-         self ._msc3666_enabled  =  hs .config .experimental .msc3666_enabled 
63- 
6462    async  def  get_old_rooms_from_upgraded_room (self , room_id : str ) ->  Iterable [str ]:
6563        """Retrieves room IDs of old rooms in the history of an upgraded room. 
6664
@@ -353,22 +351,20 @@ async def _search(
353351                state  =  await  self .state_handler .get_current_state (room_id )
354352                state_results [room_id ] =  list (state .values ())
355353
356-         aggregations  =  None 
357-         if  self ._msc3666_enabled :
358-             aggregations  =  await  self ._relations_handler .get_bundled_aggregations (
359-                 # Generate an iterable of EventBase for all the events that will be 
360-                 # returned, including contextual events. 
361-                 itertools .chain (
362-                     # The events_before and events_after for each context. 
363-                     itertools .chain .from_iterable (
364-                         itertools .chain (context ["events_before" ], context ["events_after" ])  # type: ignore[arg-type] 
365-                         for  context  in  contexts .values ()
366-                     ),
367-                     # The returned events. 
368-                     search_result .allowed_events ,
354+         aggregations  =  await  self ._relations_handler .get_bundled_aggregations (
355+             # Generate an iterable of EventBase for all the events that will be 
356+             # returned, including contextual events. 
357+             itertools .chain (
358+                 # The events_before and events_after for each context. 
359+                 itertools .chain .from_iterable (
360+                     itertools .chain (context ["events_before" ], context ["events_after" ])  # type: ignore[arg-type] 
361+                     for  context  in  contexts .values ()
369362                ),
370-                 user .to_string (),
371-             )
363+                 # The returned events. 
364+                 search_result .allowed_events ,
365+             ),
366+             user .to_string (),
367+         )
372368
373369        # We're now about to serialize the events. We should not make any 
374370        # blocking calls after this. Otherwise, the 'age' will be wrong. 
0 commit comments