From c39af7e7168d3470cb6854a77b2059b5afbccbf2 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Fri, 1 May 2026 14:33:50 -0500 Subject: [PATCH] Fix tie-break order --- synapse/handlers/federation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 4f74814aea..ba83d4fd26 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -287,7 +287,9 @@ class FederationHandler: # as they're more likely to reveal history that we can return (something # absolutely in the past is better than something can potentially extend # into the past). - 1 if current_depth >= e.depth else 0, + # + # This sorts ascending so 0 sorts before 1 + 0 if current_depth >= e.depth else 1, ), )