]> cat aescling's git repositories - mastodon.git/commitdiff
Do not count self in potential friendships (#8014)
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 14 Jul 2018 01:44:23 +0000 (03:44 +0200)
committerYamagishi Kazutoshi <ykzts@desire.sh>
Sat, 14 Jul 2018 01:44:23 +0000 (10:44 +0900)
app/lib/potential_friendship_tracker.rb

index 362482669eb79b15af2c903f73f8d3108c01dc12..017a9748d5f979caa16712c3a2fabe4d185be702 100644 (file)
@@ -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]