This commit is contained in:
parent
5d82443389
commit
bd1f3a2f01
3 changed files with 22 additions and 23 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue