diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-25 23:06:26 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-25 23:06:26 +0900 |
| commit | 95db21e76dd77f428a9004ea154c1f6d8e9c3a6d (patch) | |
| tree | c62e7e39b0078573e7f8612ce3fc41dff36d5c7e /src/api/endpoints/posts/create.ts | |
| parent | [Client:Desktop] :art: (diff) | |
| download | sharkey-95db21e76dd77f428a9004ea154c1f6d8e9c3a6d.tar.gz sharkey-95db21e76dd77f428a9004ea154c1f6d8e9c3a6d.tar.bz2 sharkey-95db21e76dd77f428a9004ea154c1f6d8e9c3a6d.zip | |
[API] Fix bug
Diffstat (limited to 'src/api/endpoints/posts/create.ts')
| -rw-r--r-- | src/api/endpoints/posts/create.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/endpoints/posts/create.ts b/src/api/endpoints/posts/create.ts index 9ece143fa1..9a86318d7d 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'); |