Update CleanRemoteNotesProcessorService.ts

This commit is contained in:
syuilo 2025-07-17 09:49:37 +09:00
parent 6fff29abb2
commit fd15a90b77
1 changed files with 2 additions and 2 deletions

View File

@ -67,6 +67,8 @@ export class CleanRemoteNotesProcessorService {
break;
}
await this.notesRepository.delete(notes.map(note => note.id));
for (const note of notes) {
const t = this.idService.parse(note.id).date.getTime();
if (stats.oldest === null || t < stats.oldest) {
@ -77,8 +79,6 @@ export class CleanRemoteNotesProcessorService {
}
}
await this.notesRepository.delete(notes.map(note => note.id));
cursor = notes.at(-1)?.id ?? null;
stats.deletedCount += notes.length;