From b56011514b9e5b3f53fee9769c078c6ff96e34e6 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 22 Aug 2022 12:01:23 +0100 Subject: [PATCH] Fix a query --- roomserver/storage/postgres/previous_events_table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) `