about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-07-14 03:44:23 +0200
committerYamagishi Kazutoshi <ykzts@desire.sh>2018-07-14 10:44:23 +0900
commit47c59591e06c531fb66444b79c45cde13545ccc8 (patch)
tree58e85fa05c62ed6b85a43e63166a6abfc8320c7c
parentc8c25ea7eb07d080d3394c3a47038bdd977dab3d (diff)
Do not count self in potential friendships (#8014)
-rw-r--r--app/lib/potential_friendship_tracker.rb2
1 files changed, 2 insertions, 0 deletions
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]