Browse Source

Fix joining rooms through aliases where the alias server isn't a real homeserver (#15776)

Tulir Asokan 11 months ago
parent
commit
1404f68a03
2 changed files with 2 additions and 1 deletions
  1. 1 0
      changelog.d/15776.bugfix
  2. 1 1
      synapse/handlers/room_member.py

+ 1 - 0
changelog.d/15776.bugfix

@@ -0,0 +1 @@
+Fix joining rooms through aliases where the alias server isn't a real homeserver. Contributed by @tulir @ Beeper.

+ 1 - 1
synapse/handlers/room_member.py

@@ -1498,7 +1498,7 @@ class RoomMemberHandler(metaclass=abc.ABCMeta):
         # put the server which owns the alias at the front of the server list.
         if room_alias.domain in servers:
             servers.remove(room_alias.domain)
-        servers.insert(0, room_alias.domain)
+            servers.insert(0, room_alias.domain)
 
         return RoomID.from_string(room_id), servers