diff --git a/packages/backend/src/server/api/common/generate-visibility-query.ts b/packages/backend/src/server/api/common/generate-visibility-query.ts index f23874519..6f2bb35fd 100644 --- a/packages/backend/src/server/api/common/generate-visibility-query.ts +++ b/packages/backend/src/server/api/common/generate-visibility-query.ts @@ -57,6 +57,12 @@ export function generateVisibilityQuery( }), ); + q.andWhere(new Brackets((qb) => { + qb.where(`note.visibility != 'hidden'`).orWhere( + `note.userId = :meId`, + ); + })); + q.setParameters({ meId: me.id }); } }