summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--synapse/storage/search.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py
index 41451ade57..e658e07dc7 100644
--- a/synapse/storage/search.py
+++ b/synapse/storage/search.py
@@ -48,7 +48,8 @@ class SearchStore(SQLBaseStore):
         args = []
 
         # Make sure we don't explode because the person is in too many rooms.
-        if len(room_ids) > 500:
+        # We filter the results regardless.
+        if len(room_ids) < 500:
             clauses.append(
                 "room_id IN (%s)" % (",".join(["?"] * len(room_ids)),)
             )