diff --git a/roomserver/storage/postgres/previous_events_table.go b/roomserver/storage/postgres/previous_events_table.go index a4a8521a5..7cac62c65 100644 --- a/roomserver/storage/postgres/previous_events_table.go +++ b/roomserver/storage/postgres/previous_events_table.go @@ -61,7 +61,7 @@ const selectPreviousEventExistsSQL = "" + const purgePreviousEventsSQL = ` DELETE FROM roomserver_previous_events WHERE event_nids && ANY( - SELECT ARRAY_AGG(event_nid) FROM roomserver_events WHERE room_nid = 42 + SELECT ARRAY_AGG(event_nid) FROM roomserver_events WHERE room_nid = $1 ) `