diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2021-04-24 17:01:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-24 17:01:43 +0200 |
commit | daccc07dc170627b17564402296f6c8631d0cd97 (patch) | |
tree | bb1fea8fde8f44b622b9b39cff46026689dc30ca /app/lib | |
parent | 863ae47b5145e53c6cc820bd7eff0efd41339e03 (diff) |
Change auto-following admin-selected accounts, show in recommendations (#16078)
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/potential_friendship_tracker.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/app/lib/potential_friendship_tracker.rb b/app/lib/potential_friendship_tracker.rb index e72d454b6..f5bc20346 100644 --- a/app/lib/potential_friendship_tracker.rb +++ b/app/lib/potential_friendship_tracker.rb @@ -27,15 +27,5 @@ class PotentialFriendshipTracker def remove(account_id, target_account_id) redis.zrem("interactions:#{account_id}", target_account_id) end - - def get(account, limit) - account_ids = redis.zrevrange("interactions:#{account.id}", 0, limit) - - return [] if account_ids.empty? || limit < 1 - - accounts = Account.searchable.where(id: account_ids).index_by(&:id) - - account_ids.map { |id| accounts[id.to_i] }.compact - end end end |