summary refs log tree commit diff
path: root/synapse/handlers/federation.py
diff options
context:
space:
mode:
authorPatrick Cloke <patrickc@matrix.org>2023-04-07 10:17:21 -0400
committerPatrick Cloke <patrickc@matrix.org>2023-07-17 11:05:43 -0400
commitc02f1153069d6abae931e46d2351c53ecc8b185a (patch)
tree2ded549b33dd30e9cb50ae5c63e68f690efa581d /synapse/handlers/federation.py
parentRemove references to m.room.hub events. (diff)
downloadsynapse-c02f1153069d6abae931e46d2351c53ecc8b185a.tar.xz
Linearized Matrix events do not have a depth.
Diffstat (limited to '')
-rw-r--r--synapse/handlers/federation.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index cc5ed97730..d90a14788d 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -662,7 +662,9 @@ class FederationHandler:
                 origin = ret.origin
                 state = ret.state
                 auth_chain = ret.auth_chain
-                auth_chain.sort(key=lambda e: e.depth)
+                # TODO(LM) Assume the auth chain is reasonable ordered.
+                if not room_version_obj.linearized_matrix:
+                    auth_chain.sort(key=lambda e: e.depth)
 
                 logger.debug("do_invite_join auth_chain: %s", auth_chain)
                 logger.debug("do_invite_join state: %s", state)