add decrement replies count on delete note and a test for that
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user