1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-01 08:18:53 +09:00

Do not count self in potential friendships (#8014)

This commit is contained in:
Eugen Rochko 2018-07-14 03:44:23 +02:00 committed by Yamagishi Kazutoshi
parent c8c25ea7eb
commit 47c59591e0

View File

@ -12,6 +12,8 @@ class PotentialFriendshipTracker
class << self class << self
def record(account_id, target_account_id, action) def record(account_id, target_account_id, action)
return if account_id == target_account_id
key = "interactions:#{account_id}" key = "interactions:#{account_id}"
weight = WEIGHTS[action] weight = WEIGHTS[action]