1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-27 02:14:37 +02:00

fix: Remote Note Cleaning will delete notes embedded in a page (#16408)

* feat: preserve number of pages referencing the note

* chore: delete pages on account delete

* fix: notes on the pages are removed by CleanRemoteNotes

* test: add the simplest test for page embedded notes

* fix: section block is not considered

* fix: section block is not considered in migration

* chore: remove comments from columns

* revert unnecessary change

* add pageCount to webhook test

* fix type error on backend
This commit is contained in:
anatawa12
2025-08-15 22:39:55 +09:00
committed by GitHub
parent bae92a944d
commit 60f7278aff
13 changed files with 402 additions and 98 deletions

View File

@@ -82,6 +82,7 @@ export class CleanRemoteNotesProcessorService {
const removalCriteria = [
'note."id" < :newestLimit',
'note."clippedCount" = 0',
'note."pageCount" = 0',
'note."userHost" IS NOT NULL',
'NOT EXISTS (SELECT 1 FROM user_note_pining WHERE "noteId" = note."id")',
'NOT EXISTS (SELECT 1 FROM note_favorite WHERE "noteId" = note."id")',