reformat generateSilencedUserQueryForNotes for readability
This commit is contained in:
parent
21700a668e
commit
e9d9246f64
1 changed files with 3 additions and 3 deletions
|
|
@ -247,12 +247,12 @@ export class QueryService {
|
||||||
// case 1: user does not exist (note is not reply/renote)
|
// case 1: user does not exist (note is not reply/renote)
|
||||||
qb.orWhere(`note.${key}Id IS NULL`);
|
qb.orWhere(`note.${key}Id IS NULL`);
|
||||||
|
|
||||||
// case 2: user not silenced AND instance not silenced
|
// case 2: user not silenced AND (instance not silenced OR instance is local)
|
||||||
qb.orWhere(new Brackets(qbb => qbb
|
qb.orWhere(new Brackets(qbb => qbb
|
||||||
|
.andWhere(`"${key}"."isSilenced" = false`)
|
||||||
.andWhere(new Brackets(qbbb => qbbb
|
.andWhere(new Brackets(qbbb => qbbb
|
||||||
.orWhere(`"${key}Instance"."isSilenced" = false`)
|
.orWhere(`"${key}Instance"."isSilenced" = false`)
|
||||||
.orWhere(`"${key}Instance" IS NULL`)))
|
.orWhere(`"note"."${key}Host" IS NULL`)))));
|
||||||
.andWhere(`"${key}"."isSilenced" = false`)));
|
|
||||||
|
|
||||||
if (me) {
|
if (me) {
|
||||||
// case 3: we are the author
|
// case 3: we are the author
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue