summary refs log tree commit diff
path: root/synapse/storage/search.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-10-22 16:18:35 +0100
committerErik Johnston <erik@matrix.org>2015-10-22 16:18:35 +0100
commitfb0fecd0b9f430670ca6de1f4746601dd6cc24f8 (patch)
treee3c04229897e2d37c9f021b1ff28a9d7ae63d2d6 /synapse/storage/search.py
parentUse namedtuple as return value (diff)
downloadsynapse-fb0fecd0b9f430670ca6de1f4746601dd6cc24f8.tar.xz
LESS THAN
Diffstat (limited to 'synapse/storage/search.py')
-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)),)
             )