From 4359a139462b27b5ee5ae60894fc7e72263b1938 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Sun, 15 Oct 2023 02:09:38 +0200 Subject: [PATCH] fix: Boost count not decrementing on removal --- packages/backend/src/core/NoteDeleteService.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/backend/src/core/NoteDeleteService.ts b/packages/backend/src/core/NoteDeleteService.ts index 9a817ffd76..6e8622468d 100644 --- a/packages/backend/src/core/NoteDeleteService.ts +++ b/packages/backend/src/core/NoteDeleteService.ts @@ -68,6 +68,10 @@ export class NoteDeleteService { await this.notesRepository.decrement({ id: note.replyId }, 'repliesCount', 1); } + if (note.renoteId && note.renote?.userId != user.id && note.text == null && !note.hasPoll && (note.fileIds == null || note.fileIds.length === 0)) { + await this.notesRepository.decrement({ id: note.renoteId }, 'renoteCount', 1); + } + if (!quiet) { this.globalEventService.publishNoteStream(note.id, 'deleted', { deletedAt: deletedAt,