fix: Boost count not decrementing on removal
This commit is contained in:
parent
46f1882123
commit
4359a13946
1 changed files with 4 additions and 0 deletions
|
@ -68,6 +68,10 @@ export class NoteDeleteService {
|
||||||
await this.notesRepository.decrement({ id: note.replyId }, 'repliesCount', 1);
|
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) {
|
if (!quiet) {
|
||||||
this.globalEventService.publishNoteStream(note.id, 'deleted', {
|
this.globalEventService.publishNoteStream(note.id, 'deleted', {
|
||||||
deletedAt: deletedAt,
|
deletedAt: deletedAt,
|
||||||
|
|
Loading…
Reference in a new issue