From d5fe5687611a147e044b430d430beafb68ead5ce Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 25 Mar 2017 23:06:26 +0900 Subject: [PATCH] [API] Fix bug --- src/api/endpoints/posts/create.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/endpoints/posts/create.ts b/src/api/endpoints/posts/create.ts index 9ece143fa..9a86318d7 100644 --- a/src/api/endpoints/posts/create.ts +++ b/src/api/endpoints/posts/create.ts @@ -148,9 +148,13 @@ module.exports = (params, user, app) => new Promise(async (res, rej) => { if (user.latest_post) { if (deepEqual({ text: user.latest_post.text, + reply: user.latest_post.reply_to_id ? user.latest_post.reply_to_id.toString() : null, + repost: user.latest_post.repost_id ? user.latest_post.repost_id.toString() : null, media_ids: (user.latest_post.media_ids || []).map(id => id.toString()) }, { text: text, + reply: inReplyToPost ? inReplyToPost._id.toString() : null, + repost: repost ? repost._id.toString() : null, media_ids: (files || []).map(file => file._id.toString()) })) { return rej('duplicate');