From 11e05a3a3298ea072f24ece0ad7a5c8c00bb1b23 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 22 Dec 2017 05:41:21 +0900 Subject: wip --- src/api/endpoints/posts/create.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/api') diff --git a/src/api/endpoints/posts/create.ts b/src/api/endpoints/posts/create.ts index 7270efaf71..9d791538fe 100644 --- a/src/api/endpoints/posts/create.ts +++ b/src/api/endpoints/posts/create.ts @@ -215,7 +215,11 @@ module.exports = (params, user: IUser, app) => new Promise(async (res, rej) => { poll: poll, text: text, user_id: user._id, - app_id: app ? app._id : null + app_id: app ? app._id : null, + + // 以下非正規化データ + _reply: reply ? { user_id: reply.user_id } : undefined, + _repost: repost ? { user_id: repost.user_id } : undefined, }); // Serialize -- cgit v1.2.3-freya