From 893b4ae260cc1928bc321fa93e2ebeabe4eafb8b Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Thu, 23 Oct 2025 11:30:10 -0400 Subject: [PATCH] avoid extra join in BackgroundTaskProcessorService.processPostNote --- .../src/queue/processors/BackgroundTaskProcessorService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/queue/processors/BackgroundTaskProcessorService.ts b/packages/backend/src/queue/processors/BackgroundTaskProcessorService.ts index f4b9309991..53edd06a64 100644 --- a/packages/backend/src/queue/processors/BackgroundTaskProcessorService.ts +++ b/packages/backend/src/queue/processors/BackgroundTaskProcessorService.ts @@ -253,11 +253,12 @@ export class BackgroundTaskProcessorService { private async processPostNote(task: PostNoteBackgroundTask): Promise { const note = await this.notesRepository.findOne({ where: { id: task.noteId }, - relations: { user: true, renote: true, reply: true, channel: true }, + relations: { renote: true, reply: true, channel: true }, }); if (!note) return `Skipping post-note task: note ${task.noteId} has been deleted`; const user = await this.cacheService.findUserById(note.userId); if (user.isSuspended) return `Skipping post-note task: note ${task.noteId}'s user ${note.userId} is suspended`; + note.user = user; const mentionedUsers = await this.cacheService.getUsers(note.mentions); const poll = await this.pollsRepository.findOneBy({ noteId: note.id });