mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-08 18:16:59 +00:00
Select distinct on room memberships in sync API (#1292)
This commit is contained in:
parent
ec95d331a5
commit
5aaf32bbed
@ -70,7 +70,7 @@ const deleteRoomStateByEventIDSQL = "" +
|
|||||||
"DELETE FROM syncapi_current_room_state WHERE event_id = $1"
|
"DELETE FROM syncapi_current_room_state WHERE event_id = $1"
|
||||||
|
|
||||||
const selectRoomIDsWithMembershipSQL = "" +
|
const selectRoomIDsWithMembershipSQL = "" +
|
||||||
"SELECT room_id FROM syncapi_current_room_state WHERE type = 'm.room.member' AND state_key = $1 AND membership = $2"
|
"SELECT DISTINCT room_id FROM syncapi_current_room_state WHERE type = 'm.room.member' AND state_key = $1 AND membership = $2"
|
||||||
|
|
||||||
const selectCurrentStateSQL = "" +
|
const selectCurrentStateSQL = "" +
|
||||||
"SELECT headered_event_json FROM syncapi_current_room_state WHERE room_id = $1" +
|
"SELECT headered_event_json FROM syncapi_current_room_state WHERE room_id = $1" +
|
||||||
|
@ -58,7 +58,7 @@ const deleteRoomStateByEventIDSQL = "" +
|
|||||||
"DELETE FROM syncapi_current_room_state WHERE event_id = $1"
|
"DELETE FROM syncapi_current_room_state WHERE event_id = $1"
|
||||||
|
|
||||||
const selectRoomIDsWithMembershipSQL = "" +
|
const selectRoomIDsWithMembershipSQL = "" +
|
||||||
"SELECT room_id FROM syncapi_current_room_state WHERE type = 'm.room.member' AND state_key = $1 AND membership = $2"
|
"SELECT DISTINCT room_id FROM syncapi_current_room_state WHERE type = 'm.room.member' AND state_key = $1 AND membership = $2"
|
||||||
|
|
||||||
const selectCurrentStateSQL = "" +
|
const selectCurrentStateSQL = "" +
|
||||||
"SELECT headered_event_json FROM syncapi_current_room_state WHERE room_id = $1" +
|
"SELECT headered_event_json FROM syncapi_current_room_state WHERE room_id = $1" +
|
||||||
|
Loading…
Reference in New Issue
Block a user