diff --git a/packages/backend/src/core/QueryService.ts b/packages/backend/src/core/QueryService.ts index c4feeaf971..00f0c0afba 100755 --- a/packages/backend/src/core/QueryService.ts +++ b/packages/backend/src/core/QueryService.ts @@ -195,7 +195,9 @@ export class QueryService { qb .where('note.visibility = \'public\'') .orWhere('note.visibility = \'home\''); - })); + }) + .andWhere('note.localOnly = FALSE') // 連合なしのノートは未ログイン者には見せない + ); } else { const followingQuery = this.followingsRepository.createQueryBuilder('following') .select('following.followeeId') diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts index 7b5d46e41c..1a6e209021 100755 --- a/packages/backend/src/core/entities/NoteEntityService.ts +++ b/packages/backend/src/core/entities/NoteEntityService.ts @@ -97,6 +97,11 @@ export class NoteEntityService implements OnModuleInit { } } + // 連合なしで未ログインなら非表示 + if(packedNote.localOnly && !meId){ + hide = true; + } + // visibility が followers かつ自分が投稿者のフォロワーでなかったら非表示 if (packedNote.visibility === 'followers') { if (meId == null) { @@ -241,6 +246,11 @@ export class NoteEntityService implements OnModuleInit { } } + // 連合なし、かつ visibility が home で未ログインなら非表示 + if(note.localOnly && note.visibility === 'home' && !meId){ + return false; + } + // visibility が followers かつ自分が投稿者のフォロワーでなかったら非表示 if (note.visibility === 'followers') { if (meId == null) {