From 17da05ca542c068f22254b1c6491ca72c2c00ccb Mon Sep 17 00:00:00 2001 From: Daiki Mizukami Date: Mon, 19 Aug 2024 23:22:25 +0900 Subject: [PATCH] fix(backend): align visibility check of `liked` collection with `outbox` --- packages/backend/src/server/ActivityPubServerService.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/backend/src/server/ActivityPubServerService.ts b/packages/backend/src/server/ActivityPubServerService.ts index 5d4c17ab1d..5f53188250 100644 --- a/packages/backend/src/server/ActivityPubServerService.ts +++ b/packages/backend/src/server/ActivityPubServerService.ts @@ -400,6 +400,12 @@ export class ActivityPubServerService { .limit(limit + 1) .orderBy('reaction.id', 'DESC') .innerJoinAndSelect('reaction.note', 'note') + .andWhere(new Brackets(qb => { + qb + .where('note.visibility = \'public\'') + .orWhere('note.visibility = \'home\''); + })) + .andWhere('note.localOnly = FALSE') .getMany(); // 「次のページ」があるかどうか