Provide same servers list in s2s alias results as c2s. (#18970)

Signed-off-by: Jason Volk <jason@zemos.net>
Co-authored-by: dasha_uwu <dasha@linuxping.win>
This commit is contained in:
Jason Volk 2025-11-13 03:12:03 -08:00 committed by GitHub
parent df802882bb
commit e67ba69f20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 10 deletions

1
changelog.d/18970.misc Normal file
View File

@ -0,0 +1 @@
Provide additional servers with federation room directory results.

View File

@ -321,16 +321,7 @@ class DirectoryHandler:
if not self.hs.is_mine(room_alias):
raise SynapseError(400, "Room Alias is not hosted on this homeserver")
result = await self.get_association_from_room_alias(room_alias)
if result is not None:
return {"room_id": result.room_id, "servers": result.servers}
else:
raise SynapseError(
404,
"Room alias %r not found" % (room_alias.to_string(),),
Codes.NOT_FOUND,
)
return await self.get_association(room_alias)
async def _update_canonical_alias(
self, requester: Requester, user_id: str, room_id: str, room_alias: RoomAlias