Fix filtering issue (#3593)

Fixes #3489 

### Pull Request Checklist

<!-- Please read
https://matrix-org.github.io/dendrite/development/contributing before
submitting your pull request -->

* [x] I have added Go unit tests or [Complement integration
tests](https://github.com/matrix-org/complement) for this PR _or_ I have
justified why this PR doesn't need tests
* [x] Pull request includes a [sign off
below](https://element-hq.github.io/dendrite/development/contributing#sign-off)
_or_ I have already signed off privately

---------

Signed-off-by: Till Faelligen <2353100+S7evinK@users.noreply.github.com>
This commit is contained in:
Till 2025-06-05 21:07:24 +02:00 committed by GitHub
parent ad0d5caf43
commit 0ca63e0650
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 78 additions and 68 deletions

View file

@ -46,7 +46,7 @@ func prepareWithFilters(
params, offset = append(params, v), offset+1
}
} else {
query += ` AND sender NOT = ""`
query += ` AND sender != ""`
}
}
if types != nil {
@ -66,7 +66,7 @@ func prepareWithFilters(
params, offset = append(params, v), offset+1
}
} else {
query += ` AND type NOT = ""`
query += ` AND type != ""`
}
}
if containsURL != nil {