mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-12 16:53:09 +02:00
[API] Fix bug
This commit is contained in:
parent
21c472d35b
commit
95db21e76d
1 changed files with 4 additions and 0 deletions
|
@ -148,9 +148,13 @@ module.exports = (params, user, app) => new Promise(async (res, rej) => {
|
||||||
if (user.latest_post) {
|
if (user.latest_post) {
|
||||||
if (deepEqual({
|
if (deepEqual({
|
||||||
text: user.latest_post.text,
|
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())
|
media_ids: (user.latest_post.media_ids || []).map(id => id.toString())
|
||||||
}, {
|
}, {
|
||||||
text: text,
|
text: text,
|
||||||
|
reply: inReplyToPost ? inReplyToPost._id.toString() : null,
|
||||||
|
repost: repost ? repost._id.toString() : null,
|
||||||
media_ids: (files || []).map(file => file._id.toString())
|
media_ids: (files || []).map(file => file._id.toString())
|
||||||
})) {
|
})) {
|
||||||
return rej('duplicate');
|
return rej('duplicate');
|
||||||
|
|
Loading…
Reference in a new issue