fix excludeAuthor check in QueryService.generateBlockedHostQueryForNote

This commit is contained in:
Hazelnoot 2025-08-14 09:54:03 -04:00
parent c9fc153fe2
commit 929ddb7e76

View file

@ -266,8 +266,9 @@ export class QueryService {
.orWhere(`"${key}Instance" IS NULL`) // local .orWhere(`"${key}Instance" IS NULL`) // local
.orWhere(`"${key}Instance"."isBlocked" = false`); // not blocked .orWhere(`"${key}Instance"."isBlocked" = false`); // not blocked
if (excludeAuthor) { if (key !== 'user') {
qb.orWhere(`note.userId = note.${key}Id`); // author // Don't re-check self-replies and self-renote targets
qb.orWhere(`note.userId = note.${key}Id`);
} }
})); }));