chore: extend for deleting notes

This commit is contained in:
anatawa12 2025-04-14 00:00:07 +09:00
parent 5958a407d0
commit 00b09924a6
No known key found for this signature in database
GPG Key ID: 9CA909848B8E4EA6
1 changed files with 4 additions and 2 deletions

View File

@ -11,7 +11,7 @@ import { MiUser } from '@/models/User.js';
import type Logger from '@/logger.js';
import { DriveService } from '@/core/DriveService.js';
import type { MiDriveFile } from '@/models/DriveFile.js';
import type { MiNote } from '@/models/Note.js';
import { MiNote } from '@/models/Note.js';
import { EmailService } from '@/core/EmailService.js';
import { bindThis } from '@/decorators.js';
import { SearchService } from '@/core/SearchService.js';
@ -78,7 +78,9 @@ export class DeleteAccountProcessorService {
cursor = notes.at(-1)?.id ?? null;
await this.notesRepository.delete(notes.map(note => note.id));
await extendTimeoutQuery(this.db, async (manager) => {
await manager.delete(MiNote, notes.map(note => note.id));
});
for (const note of notes) {
await this.searchService.unindexNote(note);