mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-22 11:41:38 +00:00
Only return non-stub rooms from GetKnownRooms
(#2049)
* Only return non-stub rooms from `GetKnownRooms` This should stop a bunch of errors at startup with invalid server ACLs. * Fix query
This commit is contained in:
parent
e81ef1649b
commit
403498a85b
@ -74,7 +74,7 @@ const selectRoomInfoSQL = "" +
|
|||||||
"SELECT room_version, room_nid, state_snapshot_nid, latest_event_nids FROM roomserver_rooms WHERE room_id = $1"
|
"SELECT room_version, room_nid, state_snapshot_nid, latest_event_nids FROM roomserver_rooms WHERE room_id = $1"
|
||||||
|
|
||||||
const selectRoomIDsSQL = "" +
|
const selectRoomIDsSQL = "" +
|
||||||
"SELECT room_id FROM roomserver_rooms"
|
"SELECT room_id FROM roomserver_rooms WHERE array_length(latest_event_nids, 1) > 0"
|
||||||
|
|
||||||
const bulkSelectRoomIDsSQL = "" +
|
const bulkSelectRoomIDsSQL = "" +
|
||||||
"SELECT room_id FROM roomserver_rooms WHERE room_nid = ANY($1)"
|
"SELECT room_id FROM roomserver_rooms WHERE room_nid = ANY($1)"
|
||||||
|
@ -65,7 +65,7 @@ const selectRoomInfoSQL = "" +
|
|||||||
"SELECT room_version, room_nid, state_snapshot_nid, latest_event_nids FROM roomserver_rooms WHERE room_id = $1"
|
"SELECT room_version, room_nid, state_snapshot_nid, latest_event_nids FROM roomserver_rooms WHERE room_id = $1"
|
||||||
|
|
||||||
const selectRoomIDsSQL = "" +
|
const selectRoomIDsSQL = "" +
|
||||||
"SELECT room_id FROM roomserver_rooms"
|
"SELECT room_id FROM roomserver_rooms WHERE latest_event_nids != '[]'"
|
||||||
|
|
||||||
const bulkSelectRoomIDsSQL = "" +
|
const bulkSelectRoomIDsSQL = "" +
|
||||||
"SELECT room_id FROM roomserver_rooms WHERE room_nid IN ($1)"
|
"SELECT room_id FROM roomserver_rooms WHERE room_nid IN ($1)"
|
||||||
|
Loading…
Reference in New Issue
Block a user