summary refs log tree commit diff
path: root/synapse/storage/stream.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-01 16:32:46 +0000
committerErik Johnston <erik@matrix.org>2016-02-01 16:32:46 +0000
commit89b40b225cda4326081f6735b2a8a9bff5ce3446 (patch)
treee1370adf48d36f3e0f9d5c02ce305d56f3dc75b3 /synapse/storage/stream.py
parentSwitch over /events to use per room caches (diff)
downloadsynapse-89b40b225cda4326081f6735b2a8a9bff5ce3446.tar.xz
Order things correctly
Diffstat (limited to '')
-rw-r--r--synapse/storage/stream.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index fd84aa8996..a03458c2fc 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -598,6 +598,10 @@ class StreamStore(SQLBaseStore):
             internal = event.internal_metadata
             internal.before = str(RoomStreamToken(topo, stream - 1))
             internal.after = str(RoomStreamToken(topo, stream))
+            internal.order = (
+                int(topo) if topo else 0,
+                int(stream),
+            )
 
     @defer.inlineCallbacks
     def get_events_around(self, room_id, event_id, before_limit, after_limit):