Change algorithm of follow recommendations (#28314)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko 2023-12-19 11:59:43 +01:00 committed by GitHub
commit b5ac61b2c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 297 additions and 292 deletions

View file

@ -33,7 +33,7 @@ class ReblogService < BaseService
ActivityPub::DistributionWorker.perform_async(reblog.id)
create_notification(reblog)
bump_potential_friendship(account, reblog)
increment_statistics
reblog
end
@ -50,12 +50,8 @@ class ReblogService < BaseService
end
end
def bump_potential_friendship(account, reblog)
def increment_statistics
ActivityTracker.increment('activity:interactions')
return if account.following?(reblog.reblog.account_id)
PotentialFriendshipTracker.record(account.id, reblog.reblog.account_id, :reblog)
end
def build_json(reblog)