summary refs log tree commit diff
path: root/synapse/storage/stream.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-19 17:18:19 +0100
committerErik Johnston <erik@matrix.org>2014-08-19 17:18:19 +0100
commitd4fb1c8a924911ea7a24b927157f8ae21087f631 (patch)
treee348c2965ff2155a08f52ffcd0286889e6e28496 /synapse/storage/stream.py
parentFix token to correct format (diff)
downloadsynapse-d4fb1c8a924911ea7a24b927157f8ae21087f631.tar.xz
Only hit get_room_events_stream if we have a valid user_id
Diffstat (limited to 'synapse/storage/stream.py')
-rw-r--r--synapse/storage/stream.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index 895a61fbc1..f2be275641 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -112,8 +112,11 @@ class StreamStore(SQLBaseStore):
     @log_function
     def get_room_events(self, user_id, from_key, to_key, room_id, limit=0,
                         direction='f', with_feedback=False):
+        # We deal with events request in two different ways depending on if
+        # this looks like an /events request or a pagination request.
         is_events = (
             direction == 'f'
+            and user_id
             and is_stream_token(from_key)
             and to_key and is_stream_token(to_key)
         )