This commit is contained in:
syuilo 2019-01-26 17:47:56 +09:00
parent 741efa1a9a
commit a0f8c7e94e
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
3 changed files with 15 additions and 0 deletions

View file

@ -30,12 +30,25 @@ export default async function(user: IUser, note: INote) {
text: null,
tags: [],
fileIds: [],
renoteId: null,
poll: null,
geo: null,
cw: null
}
});
if (note.renoteId) {
Note.update({ _id: note.renoteId }, {
$inc: {
renoteCount: -1,
score: -1
},
$pull: {
_quoteIds: note._id
}
});
}
publishNoteStream(note._id, 'deleted', {
deletedAt: deletedAt
});