summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-09 16:51:22 +0000
committerErik Johnston <erik@matrix.org>2016-03-09 16:51:22 +0000
commit8a88684736efcb6792d17249e2976caefe00ee3d (patch)
tree4c43a19b04098f1fabc578e59729141a8cd089a2 /synapse
parentReturn the correct token form (diff)
downloadsynapse-8a88684736efcb6792d17249e2976caefe00ee3d.tar.xz
Add comment
Diffstat (limited to 'synapse')
-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 c9f70a08a7..7f4a827528 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -184,6 +184,9 @@ class StreamStore(SQLBaseStore):
     @defer.inlineCallbacks
     def get_room_events_stream_for_room(self, room_id, from_key, to_key, limit=0,
                                         order='DESC'):
+        # Note: If from_key is None then we return in topological order. This
+        # is because in that case we're using this as a "get the last few messages
+        # in a room" function, rather than "get new messages since last sync"
         if from_key is not None:
             from_id = RoomStreamToken.parse_stream_token(from_key).stream
         else: