add decrement replies count on delete note and a test for that
This commit is contained in:
parent
ba9563b983
commit
08bace6c7d
2 changed files with 36 additions and 0 deletions
|
@ -29,6 +29,10 @@ export default async function(user: User, note: Note, quiet = false) {
|
|||
Notes.decrement({ id: note.renoteId }, 'score', 1);
|
||||
}
|
||||
|
||||
if (note.replyId) {
|
||||
await Notes.decrement({ id: note.replyId }, 'repliesCount', 1);
|
||||
}
|
||||
|
||||
if (!quiet) {
|
||||
publishNoteStream(note.id, 'deleted', {
|
||||
deletedAt: deletedAt,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue