mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
fix logic error in generateBlockedHostQueryForNote that would allow blocked instances if allowSilenced was set to false
This commit is contained in:
parent
15c45633e5
commit
ac8fad2422
1 changed files with 6 additions and 2 deletions
|
@ -263,8 +263,12 @@ export class QueryService {
|
|||
.orWhere(`note.${key}Host IS NULL`) // local
|
||||
.orWhere(`${key}Instance.isBlocked = false`); // not blocked
|
||||
|
||||
if (!allowSilenced) {
|
||||
qb.orWhere(`${key}Instance.isSilenced = false`); // not silenced
|
||||
if (allowSilenced) {
|
||||
qb.orWhere(`${key}Instance.isBlocked = false`); // not blocked
|
||||
} else {
|
||||
qb.orWhere(new Brackets(qbb => qbb
|
||||
.andWhere(`${key}Instance.isBlocked = false`) // not blocked
|
||||
.andWhere(`${key}Instance.isSilenced = false`))); // not silenced
|
||||
}
|
||||
|
||||
if (excludeAuthor) {
|
||||
|
|
Loading…
Add table
Reference in a new issue