summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/storage/stream.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index 613b54cd1d..c9f70a08a7 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -232,7 +232,7 @@ class StreamStore(SQLBaseStore):
             get_prev_content=True
         )
 
-        self._set_before_and_after(ret, rows, topo_order=False)
+        self._set_before_and_after(ret, rows, topo_order=from_id is None)
 
         if order.lower() == "desc":
             ret.reverse()