diff options
| author | こぴなたみぽ <Syuilotan@yahoo.co.jp> | 2017-11-06 19:14:04 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-06 19:14:04 +0900 |
| commit | 9b7edcefb991f9c463b330cc7f87d99f9a357196 (patch) | |
| tree | 0f4451044edf5d265e84adfc13c4c3f013ffb007 /src/api/endpoints/users | |
| parent | chore(package): update @types/body-parser to version 1.16.7 (diff) | |
| parent | Merge pull request #875 from syuilo/greenkeeper/@types/gulp-util-3.0.33 (diff) | |
| download | misskey-9b7edcefb991f9c463b330cc7f87d99f9a357196.tar.gz misskey-9b7edcefb991f9c463b330cc7f87d99f9a357196.tar.bz2 misskey-9b7edcefb991f9c463b330cc7f87d99f9a357196.zip | |
Merge branch 'master' into greenkeeper/@types/body-parser-1.16.7
Diffstat (limited to 'src/api/endpoints/users')
| -rw-r--r-- | src/api/endpoints/users/get_frequently_replied_users.ts | 6 | ||||
| -rw-r--r-- | src/api/endpoints/users/posts.ts | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/api/endpoints/users/get_frequently_replied_users.ts b/src/api/endpoints/users/get_frequently_replied_users.ts index 2e0e2e40a7..bb0f3b4cea 100644 --- a/src/api/endpoints/users/get_frequently_replied_users.ts +++ b/src/api/endpoints/users/get_frequently_replied_users.ts @@ -27,7 +27,7 @@ module.exports = (params, me) => new Promise(async (res, rej) => { // Fetch recent posts const recentPosts = await Post.find({ user_id: user._id, - reply_to_id: { + reply_id: { $exists: true, $ne: null } @@ -38,7 +38,7 @@ module.exports = (params, me) => new Promise(async (res, rej) => { limit: 1000, fields: { _id: false, - reply_to_id: true + reply_id: true } }); @@ -49,7 +49,7 @@ module.exports = (params, me) => new Promise(async (res, rej) => { const replyTargetPosts = await Post.find({ _id: { - $in: recentPosts.map(p => p.reply_to_id) + $in: recentPosts.map(p => p.reply_id) }, user_id: { $ne: user._id diff --git a/src/api/endpoints/users/posts.ts b/src/api/endpoints/users/posts.ts index e37b660773..d8204b8b80 100644 --- a/src/api/endpoints/users/posts.ts +++ b/src/api/endpoints/users/posts.ts @@ -85,7 +85,7 @@ module.exports = (params, me) => new Promise(async (res, rej) => { } if (!includeReplies) { - query.reply_to_id = null; + query.reply_id = null; } if (withMedia) { |