mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 13:03:50 +01:00
Fix alias query.
This commit is contained in:
parent
2b8ca84296
commit
2c79c4dc7f
1 changed files with 5 additions and 6 deletions
|
@ -141,20 +141,19 @@ class DirectoryStore(SQLBaseStore):
|
|||
Returns:
|
||||
A list of RoomAliasMappings.
|
||||
"""
|
||||
results = self._simple_select_list(
|
||||
"room_aliases",
|
||||
None,
|
||||
["room_alias", "room_id"]
|
||||
results = yield self._execute_and_decode(
|
||||
"SELECT room_id, room_alias FROM room_aliases"
|
||||
)
|
||||
|
||||
# TODO(kegan): It feels wrong to be specifying no servers here, but
|
||||
# equally this function isn't required to obtain all servers so
|
||||
# retrieving them "just for the sake of it" also seems wrong, but we
|
||||
# want to conform to passing Objects around and not dicts..
|
||||
return [
|
||||
defer.returnValue([
|
||||
RoomAliasMapping(
|
||||
room_id=r["room_id"], room_alias=r["room_alias"], servers=""
|
||||
) for r in results
|
||||
]
|
||||
])
|
||||
|
||||
|
||||
def get_aliases_for_room(self, room_id):
|
||||
|
|
Loading…
Reference in a new issue