Skip to content
Snippets Groups Projects
Commit 95db21e7 authored by syuilo's avatar syuilo
Browse files

[API] Fix bug

parent 21c472d3
No related branches found
No related tags found
No related merge requests found
......@@ -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');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment