mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-21 17:15:38 +03:00
Return the room_alias when GETing public rooms.
This commit is contained in:
parent
c87e1f6418
commit
9b3702c924
1 changed files with 5 additions and 2 deletions
|
@ -93,7 +93,10 @@ class RoomStore(SQLBaseStore):
|
|||
latest_topic = ("SELECT max(room_data.id) FROM room_data WHERE "
|
||||
+ "room_data.type = ? GROUP BY room_id")
|
||||
|
||||
query = ("SELECT rooms.*, room_data.content FROM rooms LEFT JOIN "
|
||||
query = ("SELECT rooms.*, room_data.content, room_alias FROM rooms "
|
||||
+ "LEFT JOIN "
|
||||
+ "room_aliases ON room_aliases.room_id = rooms.room_id "
|
||||
+ "LEFT JOIN "
|
||||
+ "room_data ON rooms.room_id = room_data.room_id WHERE "
|
||||
+ "(room_data.id IN (" + latest_topic + ") "
|
||||
+ "OR room_data.id IS NULL) AND rooms.is_public = ?")
|
||||
|
@ -103,7 +106,7 @@ class RoomStore(SQLBaseStore):
|
|||
)
|
||||
|
||||
# return only the keys the specification expects
|
||||
ret_keys = ["room_id", "topic"]
|
||||
ret_keys = ["room_id", "topic", "room_alias"]
|
||||
|
||||
# extract topic from the json (icky) FIXME
|
||||
for i, room_row in enumerate(res):
|
||||
|
|
Loading…
Reference in a new issue