From 47c59591e06c531fb66444b79c45cde13545ccc8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 14 Jul 2018 03:44:23 +0200 Subject: Do not count self in potential friendships (#8014) --- app/lib/potential_friendship_tracker.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app') diff --git a/app/lib/potential_friendship_tracker.rb b/app/lib/potential_friendship_tracker.rb index 362482669..017a9748d 100644 --- a/app/lib/potential_friendship_tracker.rb +++ b/app/lib/potential_friendship_tracker.rb @@ -12,6 +12,8 @@ class PotentialFriendshipTracker class << self def record(account_id, target_account_id, action) + return if account_id == target_account_id + key = "interactions:#{account_id}" weight = WEIGHTS[action] -- cgit