This commit is contained in:
syuilo 2018-05-29 00:36:52 +09:00
parent 5d82443389
commit bd1f3a2f01
3 changed files with 22 additions and 23 deletions

View file

@ -172,6 +172,24 @@ export default async (user: IUser, data: {
}
});
if (data.reply) {
Note.update({ _id: data.reply._id }, {
$push: {
_replyIds: note._id
}
});
}
const isQuote = data.renote && (data.text || data.poll || data.media);
if (isQuote) {
Note.update({ _id: data.renote._id }, {
$push: {
_quoteIds: note._id
}
});
}
// Serialize
const noteObj = await pack(note);