diff --git a/src/github.com/matrix-org/dendrite/syncapi/storage/current_room_state_table.go b/src/github.com/matrix-org/dendrite/syncapi/storage/current_room_state_table.go index dfe4314d9..2bc3fdde8 100644 --- a/src/github.com/matrix-org/dendrite/syncapi/storage/current_room_state_table.go +++ b/src/github.com/matrix-org/dendrite/syncapi/storage/current_room_state_table.go @@ -72,8 +72,7 @@ const selectCurrentStateSQL = "" + " AND ( $2::text[] IS NULL OR sender = ANY($2) )" + " AND ( $3::text[] IS NULL OR NOT(sender = ANY($3)) )" + " AND ( $4::text[] IS NULL OR type = ANY($4) )" + - " AND ( $5::text[] IS NULL OR NOT(type = ANY($5)) )" + - " LIMIT $6" + " AND ( $5::text[] IS NULL OR NOT(type = ANY($5)) )" const selectJoinedUsersSQL = "" + "SELECT room_id, state_key FROM syncapi_current_room_state WHERE type = 'm.room.member' AND membership = 'join'" @@ -189,8 +188,7 @@ func (s *currentRoomStateStatements) selectCurrentState( pq.StringArray(filter.Senders), pq.StringArray(filter.NotSenders), pq.StringArray(filter.Types), - pq.StringArray(filter.NotTypes), - filter.Limit) + pq.StringArray(filter.NotTypes)) if err != nil { return nil, err }