chore: fix non-reply / renote
This commit is contained in:
parent
12c3304cb5
commit
752f0366d8
|
@ -257,7 +257,7 @@ export class QueryService {
|
||||||
public generateSuspendedUserQueryForNote(q: SelectQueryBuilder<any>, excludeAuthor?: boolean): void {
|
public generateSuspendedUserQueryForNote(q: SelectQueryBuilder<any>, excludeAuthor?: boolean): void {
|
||||||
if (excludeAuthor) {
|
if (excludeAuthor) {
|
||||||
const brakets = (user: string) => new Brackets(qb => qb
|
const brakets = (user: string) => new Brackets(qb => qb
|
||||||
.where(`${user} IS NULL`)
|
.where(`note.${user}Id IS NULL`)
|
||||||
.orWhere(`user.id = ${user}.id`)
|
.orWhere(`user.id = ${user}.id`)
|
||||||
.orWhere(`${user}.isSuspended = FALSE`));
|
.orWhere(`${user}.isSuspended = FALSE`));
|
||||||
q
|
q
|
||||||
|
@ -265,7 +265,7 @@ export class QueryService {
|
||||||
.andWhere(brakets('renoteUser'));
|
.andWhere(brakets('renoteUser'));
|
||||||
} else {
|
} else {
|
||||||
const brakets = (user: string) => new Brackets(qb => qb
|
const brakets = (user: string) => new Brackets(qb => qb
|
||||||
.where(`${user} IS NULL`)
|
.where(`note.${user}Id IS NULL`)
|
||||||
.orWhere(`${user}.isSuspended = FALSE`));
|
.orWhere(`${user}.isSuspended = FALSE`));
|
||||||
q
|
q
|
||||||
.andWhere('user.isSuspended = FALSE')
|
.andWhere('user.isSuspended = FALSE')
|
||||||
|
|
Loading…
Reference in New Issue