mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-26 07:55:14 +00:00
fix: don't decrement past 0
This commit is contained in:
parent
48c7eeb57e
commit
97df169ebe
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ 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)) {
|
||||
if (note.renoteId && note.renote?.renoteCount !== 0 && 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue