diff --git a/synapse/handlers/search.py b/synapse/handlers/search.py index e1fb2db0c..b7545c111 100644 --- a/synapse/handlers/search.py +++ b/synapse/handlers/search.py @@ -121,7 +121,7 @@ class SearchHandler(BaseHandler): room_ids = search_filter.filter_rooms(room_ids) if batch_group == "room_id": - room_ids = room_ids & {batch_group_key} + room_ids.intersection_update({batch_group_key}) rank_map = {} # event_id -> rank of event allowed_events = []