From 57e49712140e62265e21609ad25dc16b618eda63 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Tue, 21 Feb 2023 21:16:28 +0100 Subject: [PATCH] Revert "server: fix return of `visibilityQuery` function" This reverts commit 32f4bee5e816ed483f3d42d3aa1ccf15b4d320fc. It is the right thing to do in theory, but it doesn't work. I hate typeorm. --- .../src/server/api/common/generate-visibility-query.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 0eecda29c..7094742e6 100644 --- a/packages/backend/src/server/api/common/generate-visibility-query.ts +++ b/packages/backend/src/server/api/common/generate-visibility-query.ts @@ -8,10 +8,10 @@ export function visibilityQuery(q: SelectQueryBuilder, meId?: User['id'] | .from(() => q, 'note'); if (meId == null) { - superQuery.where('note_visible(note.id, null)'); + superQuery.where('note_visible(note.id, null);'); } else { superQuery.where('note_visible(note.id, :meId)', { meId }); } - return superQuery; + return q; }