aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/postgres/current_room_state_table.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-04-11 09:05:23 +0200
committerGitHub <noreply@github.com>2022-04-11 09:05:23 +0200
commit69f2ff7c82abe0731a05febde88098f4cd34ab8d (patch)
treec7e0e2e65550f8b2d3b50e385acc6ac4cdbc90d2 /syncapi/storage/postgres/current_room_state_table.go
parentb4b2fbc36b1eb1b46640feadbe7e1729c864a898 (diff)
Correctly use provided filters (#2339)
* Apply filters correctly * Fix issues; Use prepareWithFilters * Update gmsl & tests * go.mod.. * PR comments
Diffstat (limited to 'syncapi/storage/postgres/current_room_state_table.go')
-rw-r--r--syncapi/storage/postgres/current_room_state_table.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/syncapi/storage/postgres/current_room_state_table.go b/syncapi/storage/postgres/current_room_state_table.go
index 69e6e30e..fe68788d 100644
--- a/syncapi/storage/postgres/current_room_state_table.go
+++ b/syncapi/storage/postgres/current_room_state_table.go
@@ -233,9 +233,10 @@ func (s *currentRoomStateStatements) SelectCurrentState(
excludeEventIDs []string,
) ([]*gomatrixserverlib.HeaderedEvent, error) {
stmt := sqlutil.TxStmt(txn, s.selectCurrentStateStmt)
+ senders, notSenders := getSendersStateFilterFilter(stateFilter)
rows, err := stmt.QueryContext(ctx, roomID,
- pq.StringArray(stateFilter.Senders),
- pq.StringArray(stateFilter.NotSenders),
+ pq.StringArray(senders),
+ pq.StringArray(notSenders),
pq.StringArray(filterConvertTypeWildcardToSQL(stateFilter.Types)),
pq.StringArray(filterConvertTypeWildcardToSQL(stateFilter.NotTypes)),
stateFilter.ContainsURL,