chore: preserve notes with local reactions (#16412)

This commit is contained in:
anatawa12 2025-08-17 17:08:38 +09:00 committed by GitHub
parent 9ea7340da6
commit fea9f27fd6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -86,6 +86,7 @@ export class CleanRemoteNotesProcessorService {
'note."userHost" IS NOT NULL', 'note."userHost" IS NOT NULL',
'NOT EXISTS (SELECT 1 FROM user_note_pining WHERE "noteId" = note."id")', 'NOT EXISTS (SELECT 1 FROM user_note_pining WHERE "noteId" = note."id")',
'NOT EXISTS (SELECT 1 FROM note_favorite WHERE "noteId" = note."id")', 'NOT EXISTS (SELECT 1 FROM note_favorite WHERE "noteId" = note."id")',
'NOT EXISTS (SELECT 1 FROM note_reaction INNER JOIN "user" ON note_reaction."userId" = "user".id WHERE note_reaction."noteId" = note."id" AND "user"."host" IS NULL)',
].join(' AND '); ].join(' AND ');
const minId = (await this.notesRepository.createQueryBuilder('note') const minId = (await this.notesRepository.createQueryBuilder('note')