Skip to content

Commit a9a13c3

Browse files
dasha-uwujevolk
authored andcommitted
Provide same servers list in s2s alias results as c2s.
Signed-off-by: Jason Volk <[email protected]>
1 parent f1695ac commit a9a13c3

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

changelog.d/18970.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Provide additional servers with federation room directory results.

synapse/handlers/directory.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -321,16 +321,7 @@ async def on_directory_query(self, args: JsonDict) -> JsonDict:
321321
if not self.hs.is_mine(room_alias):
322322
raise SynapseError(400, "Room Alias is not hosted on this homeserver")
323323

324-
result = await self.get_association_from_room_alias(room_alias)
325-
326-
if result is not None:
327-
return {"room_id": result.room_id, "servers": result.servers}
328-
else:
329-
raise SynapseError(
330-
404,
331-
"Room alias %r not found" % (room_alias.to_string(),),
332-
Codes.NOT_FOUND,
333-
)
324+
return await self.get_association(room_alias)
334325

335326
async def _update_canonical_alias(
336327
self, requester: Requester, user_id: str, room_id: str, room_alias: RoomAlias

0 commit comments

Comments
 (0)