From 6909add1ec991cf4f9fdcc05978520f30414f576 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 20 Jan 2019 12:25:00 +0900 Subject: Drop stalk feature Resolve #3935 Closes #2226 Closes #1946 --- src/server/api/endpoints/notes/hybrid-timeline.ts | 8 +++----- src/server/api/endpoints/notes/timeline.ts | 6 ++---- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'src/server/api/endpoints/notes') diff --git a/src/server/api/endpoints/notes/hybrid-timeline.ts b/src/server/api/endpoints/notes/hybrid-timeline.ts index 919b0662aa..c05b88a01b 100644 --- a/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -119,12 +119,10 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => { _id: -1 }; - const followQuery = followings.map(f => f.stalk ? { - userId: f.id - } : { + const followQuery = followings.map(f => ({ userId: f.id, - // ストーキングしてないならリプライは含めない(ただし投稿者自身の投稿へのリプライ、自分の投稿へのリプライ、自分のリプライは含める) + // リプライは含めない(ただし投稿者自身の投稿へのリプライ、自分の投稿へのリプライ、自分のリプライは含める) $or: [{ // リプライでない replyId: null @@ -140,7 +138,7 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => { // 自分(フォロワー)が送信したリプライ userId: user._id }] - }); + })); const visibleQuery = user == null ? [{ visibility: { $in: [ 'public', 'home' ] } diff --git a/src/server/api/endpoints/notes/timeline.ts b/src/server/api/endpoints/notes/timeline.ts index 24ed222e9a..9b0cc6ac20 100644 --- a/src/server/api/endpoints/notes/timeline.ts +++ b/src/server/api/endpoints/notes/timeline.ts @@ -117,9 +117,7 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => { _id: -1 }; - const followQuery = followings.map(f => f.stalk ? { - userId: f.id - } : { + const followQuery = followings.map(f => ({ userId: f.id, // ストーキングしてないならリプライは含めない(ただし投稿者自身の投稿へのリプライ、自分の投稿へのリプライ、自分のリプライは含める) @@ -138,7 +136,7 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => { // 自分(フォロワー)が送信したリプライ userId: user._id }] - }); + })); const visibleQuery = user == null ? [{ visibility: { $in: [ 'public', 'home' ] } -- cgit v1.2.3-freya