From a3039b3a019b9283e481f6f2ffa14940448ee9ff Mon Sep 17 00:00:00 2001
From: Krishan <33421343+kfiven@users.noreply.github.com>
Date: Fri, 28 Feb 2025 18:21:36 +1100
Subject: [PATCH] Fix error: X | Y syntax for unions requires Python 3.10

---
 synapse/rest/client/room.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/synapse/rest/client/room.py b/synapse/rest/client/room.py
index 715fd8376b..5b6ec9b17d 100644
--- a/synapse/rest/client/room.py
+++ b/synapse/rest/client/room.py
@@ -1528,7 +1528,7 @@ class RoomHierarchyRestServlet(RestServlet):
         limit = parse_integer(request, "limit")
 
         # twisted.web.server.Request.args is incorrectly defined as Optional[Any]
-        remote_room_hosts: List[str] | None
+        remote_room_hosts = None
         if self.msc4235_enabled:
             args: Dict[bytes, List[bytes]] = request.args  # type: ignore
             remote_room_hosts = parse_strings_from_args(