diff options
| author | こぴなたみぽ <syuilotan@yahoo.co.jp> | 2017-11-01 10:22:40 +0900 |
|---|---|---|
| committer | こぴなたみぽ <syuilotan@yahoo.co.jp> | 2017-11-01 10:22:40 +0900 |
| commit | 60a7640eb1547dc61997ba5db1eb2c28bdec33a0 (patch) | |
| tree | 8c0cfd5167e06d81b74efa2bca1f9bb5ab5a8e09 /src/api/endpoints/posts/create.ts | |
| parent | v2777 (diff) | |
| download | sharkey-60a7640eb1547dc61997ba5db1eb2c28bdec33a0.tar.gz sharkey-60a7640eb1547dc61997ba5db1eb2c28bdec33a0.tar.bz2 sharkey-60a7640eb1547dc61997ba5db1eb2c28bdec33a0.zip | |
RENAME: reply_to -> reply
Diffstat (limited to 'src/api/endpoints/posts/create.ts')
| -rw-r--r-- | src/api/endpoints/posts/create.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/api/endpoints/posts/create.ts b/src/api/endpoints/posts/create.ts index 2bb1a7af17..3b9e0d8997 100644 --- a/src/api/endpoints/posts/create.ts +++ b/src/api/endpoints/posts/create.ts @@ -103,9 +103,9 @@ module.exports = (params, user: IUser, app) => new Promise(async (res, rej) => { } } - // Get 'in_reply_to_post_id' parameter - const [inReplyToPostId, inReplyToPostIdErr] = $(params.reply_to_id).optional.id().$; - if (inReplyToPostIdErr) return rej('invalid in_reply_to_post_id'); + // Get 'in_reply_post_id' parameter + const [inReplyToPostId, inReplyToPostIdErr] = $(params.reply_id).optional.id().$; + if (inReplyToPostIdErr) return rej('invalid in_reply_post_id'); let inReplyToPost: IPost = null; if (inReplyToPostId !== undefined) { @@ -192,7 +192,7 @@ module.exports = (params, user: IUser, 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, + reply: user.latest_post.reply_id ? user.latest_post.reply_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()) }, { @@ -211,7 +211,7 @@ module.exports = (params, user: IUser, app) => new Promise(async (res, rej) => { channel_id: channel ? channel._id : undefined, index: channel ? channel.index + 1 : undefined, media_ids: files ? files.map(file => file._id) : undefined, - reply_to_id: inReplyToPost ? inReplyToPost._id : undefined, + reply_id: inReplyToPost ? inReplyToPost._id : undefined, repost_id: repost ? repost._id : undefined, poll: poll, text: text, |