From 8d41e3c8e4f11c296f347765c7b637160a798ad3 Mon Sep 17 00:00:00 2001 From: Daiki Mizukami Date: Mon, 19 Aug 2024 23:28:36 +0900 Subject: [PATCH] fix(backend): filter out notes by suspended users in `liked` collection --- packages/backend/src/server/ActivityPubServerService.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/backend/src/server/ActivityPubServerService.ts b/packages/backend/src/server/ActivityPubServerService.ts index 5f53188250..1320d67bf3 100644 --- a/packages/backend/src/server/ActivityPubServerService.ts +++ b/packages/backend/src/server/ActivityPubServerService.ts @@ -400,12 +400,14 @@ export class ActivityPubServerService { .limit(limit + 1) .orderBy('reaction.id', 'DESC') .innerJoinAndSelect('reaction.note', 'note') + .leftJoinAndSelect('note.user', 'noteUser') .andWhere(new Brackets(qb => { qb .where('note.visibility = \'public\'') .orWhere('note.visibility = \'home\''); })) .andWhere('note.localOnly = FALSE') + .andWhere('noteUser.isSuspended = FALSE') .getMany(); // 「次のページ」があるかどうか