diff options
author | dan <dan.abramov@gmail.com> | 2024-08-01 22:05:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-01 22:05:40 +0100 |
commit | 7f292abf51a4cd4e25702c33a3ed75f25be5b3a3 (patch) | |
tree | be64113565041e0676fd6569551304a0e96bb1b3 /src/lib/api/feed-manip.ts | |
parent | f056cb646e22d350bda79be8e8bfe808307e6516 (diff) | |
download | voidsky-7f292abf51a4cd4e25702c33a3ed75f25be5b3a3.tar.zst |
Always limit Following replies to the people you follow (#4868)
* Limit feed replies to people you follow * Remove dead code
Diffstat (limited to 'src/lib/api/feed-manip.ts')
-rw-r--r-- | src/lib/api/feed-manip.ts | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/lib/api/feed-manip.ts b/src/lib/api/feed-manip.ts index 226dd17c4..01f05685d 100644 --- a/src/lib/api/feed-manip.ts +++ b/src/lib/api/feed-manip.ts @@ -299,15 +299,7 @@ export class FeedTuner { return slices } - static thresholdRepliesOnly({ - userDid, - minLikes, - followedOnly, - }: { - userDid: string - minLikes: number - followedOnly: boolean - }) { + static followedRepliesOnly({userDid}: {userDid: string}) { return ( tuner: FeedTuner, slices: FeedViewPostsSlice[], @@ -322,9 +314,7 @@ export class FeedTuner { if (slice.isRepost) { continue } - if (slice.likeCount < minLikes) { - slices.splice(i, 1) - } else if (followedOnly && !slice.isFollowingAllAuthors(userDid)) { + if (!slice.isFollowingAllAuthors(userDid)) { slices.splice(i, 1) } } |