summary refs log tree commit diff
path: root/synapse/storage/stream.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/stream.py')
-rw-r--r--synapse/storage/stream.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py

index 60a8384fae..51f8b9e017 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py
@@ -533,7 +533,7 @@ class StreamStore(SQLBaseStore): stream_ordering = RoomStreamToken.parse_stream_token(token).stream sql = ( - "SELECT origin_server_ts FROM events" + "SELECT event_id, origin_server_ts FROM events" " WHERE room_id = ? AND stream_ordering <= ?" " ORDER BY topological_ordering DESC, stream_ordering DESC" " LIMIT 1" @@ -541,9 +541,9 @@ class StreamStore(SQLBaseStore): def f(txn): txn.execute(sql, (room_id, stream_ordering)) - rows = txn.fetchall() + rows = self.cursor_to_dict(txn) if rows: - return rows[0][0] + return rows[0] else: return None