diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-05-29 00:36:52 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-05-29 00:36:52 +0900 |
| commit | bd1f3a2f0196214248e8a259f8aacfe3e8259c19 (patch) | |
| tree | 42215db08394e4fdac96231163bca8c3355a0322 /src/services | |
| parent | 2.21.1 (diff) | |
| download | sharkey-bd1f3a2f0196214248e8a259f8aacfe3e8259c19.tar.gz sharkey-bd1f3a2f0196214248e8a259f8aacfe3e8259c19.tar.bz2 sharkey-bd1f3a2f0196214248e8a259f8aacfe3e8259c19.zip | |
#1579
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/note/create.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/services/note/create.ts b/src/services/note/create.ts index b9ff1f679b..37d21fecad 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -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); |