From e94b5ac07abd79cb62ad5206b44f81bf3dbc5881 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 23 Oct 2025 16:42:27 +0300 Subject: [PATCH] fix(server): edited notes listing automatically generated hidden notes (closes #5683) --- apps/server/src/routes/api/revisions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/server/src/routes/api/revisions.ts b/apps/server/src/routes/api/revisions.ts index 055d0b75e..d126558f0 100644 --- a/apps/server/src/routes/api/revisions.ts +++ b/apps/server/src/routes/api/revisions.ts @@ -152,14 +152,14 @@ function restoreRevision(req: Request) { } function getEditedNotesOnDate(req: Request) { - const noteIds = sql.getColumn( - ` + const noteIds = sql.getColumn(/*sql*/`\ SELECT notes.* FROM notes WHERE noteId IN ( SELECT noteId FROM notes - WHERE notes.dateCreated LIKE :date - OR notes.dateModified LIKE :date + WHERE + (notes.dateCreated LIKE :date OR notes.dateModified LIKE :date) + AND (noteId NOT LIKE '_%') UNION ALL SELECT noteId FROM revisions WHERE revisions.dateLastEdited LIKE :date