Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 3cfd3c5

Browse files
committed
Fix Postgres query.
1 parent 9a30ede commit 3cfd3c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

synapse/storage/databases/main/relations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ async def get_threads(
859859
relation_type = '{RelationTypes.THREAD}'
860860
{pagination_clause}
861861
GROUP BY relates_to_id
862-
ORDER BY topological_ordering DESC, stream_ordering DESC
862+
ORDER BY MAX(topological_ordering) DESC, MAX(stream_ordering) DESC
863863
LIMIT ?
864864
"""
865865

0 commit comments

Comments
 (0)