Always limit Following replies to the people you follow (#4868)

* Limit feed replies to people you follow

* Remove dead code
This commit is contained in:
dan 2024-08-01 22:05:40 +01:00 committed by GitHub
parent f056cb646e
commit 7f292abf51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 126 deletions

View file

@ -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)
}
}