Only list local banned users (fixes #2961) (#5364)

This commit is contained in:
Nutomic 2025-01-28 19:10:57 +00:00 committed by GitHub
parent 8e19d55295
commit f4eb8877a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -91,10 +91,12 @@ fn queries<'a>(
ListMode::Banned => { ListMode::Banned => {
query = query query = query
.filter( .filter(
person::banned.eq(true).and( person::local.eq(true).and(
person::ban_expires person::banned.eq(true).and(
.is_null() person::ban_expires
.or(person::ban_expires.gt(now().nullable())), .is_null()
.or(person::ban_expires.gt(now().nullable())),
),
), ),
) )
.filter(person::deleted.eq(false)); .filter(person::deleted.eq(false));