Skip to content

Commit

Permalink
Fix friends_of_friends sometimes suggesting already-followed accoun…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Dec 20, 2023
1 parent ac04e62 commit d29b1cc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def get(account, limit: 10)
JOIN account_stats ON account_stats.account_id = accounts.id
LEFT OUTER JOIN follow_recommendation_mutes ON follow_recommendation_mutes.target_account_id = accounts.id AND follow_recommendation_mutes.account_id = :id
WHERE follows.account_id IN (SELECT * FROM first_degree)
AND follows.target_account_id NOT IN (SELECT * FROM first_degree)
AND NOT EXISTS (SELECT 1 FROM follows f WHERE f.target_account_id = follows.target_account_id AND f.account_id = :id)
AND follows.target_account_id <> :id
AND accounts.discoverable
AND accounts.suspended_at IS NULL
Expand Down

0 comments on commit d29b1cc

Please sign in to comment.