expose whether a room is a space in the Admin API (#13208)

This commit is contained in:
andrew do 2022-07-12 07:30:53 -07:00 committed by GitHub
parent f14c632134
commit 2d82cdafd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 13 deletions

View file

@ -175,7 +175,7 @@ class RoomWorkerStore(CacheInvalidationWorkerStore):
rooms.creator, state.encryption, state.is_federatable AS federatable,
rooms.is_public AS public, state.join_rules, state.guest_access,
state.history_visibility, curr.current_state_events AS state_events,
state.avatar, state.topic
state.avatar, state.topic, state.room_type
FROM rooms
LEFT JOIN room_stats_state state USING (room_id)
LEFT JOIN room_stats_current curr USING (room_id)
@ -596,7 +596,8 @@ class RoomWorkerStore(CacheInvalidationWorkerStore):
SELECT state.room_id, state.name, state.canonical_alias, curr.joined_members,
curr.local_users_in_room, rooms.room_version, rooms.creator,
state.encryption, state.is_federatable, rooms.is_public, state.join_rules,
state.guest_access, state.history_visibility, curr.current_state_events
state.guest_access, state.history_visibility, curr.current_state_events,
state.room_type
FROM room_stats_state state
INNER JOIN room_stats_current curr USING (room_id)
INNER JOIN rooms USING (room_id)
@ -646,6 +647,7 @@ class RoomWorkerStore(CacheInvalidationWorkerStore):
"guest_access": room[11],
"history_visibility": room[12],
"state_events": room[13],
"room_type": room[14],
}
)