summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index aca795e1c4..a71cba8ef1 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -1022,7 +1022,7 @@ class RoomEventSource(object):
             events = list(room_events)
             events.extend(e for evs, _ in room_to_events.values() for e in evs)
 
-            events.sort(key=lambda e: e.internal_metadata.after)
+            events.sort(key=lambda e: e.internal_metadata.order)
 
             if limit:
                 events[:] = events[:limit]