From: Eugen Rochko Date: Sat, 14 Jul 2018 01:44:23 +0000 (+0200) Subject: Do not count self in potential friendships (#8014) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=47c59591e06c531fb66444b79c45cde13545ccc8;p=mastodon.git Do not count self in potential friendships (#8014) --- 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]