about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-07-17 22:05:25 +0200
committerThibaut Girka <thib@sitedethib.com>2018-07-17 22:05:25 +0200
commit7dbed4dab93d3eaf79b7e7e4a61f52782909d1ae (patch)
tree7a235fc9422d71f56993b4682b06439310f21f65 /app/services
parent1fb78602c56b7bf52dcf383fea7a4c45ce568655 (diff)
parent6277a6db2a70b798aed71ff7e722d23b975182cd (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/services')
-rw-r--r--app/services/favourite_service.rb1
-rw-r--r--app/services/post_status_service.rb4
-rw-r--r--app/services/reblog_service.rb1
3 files changed, 5 insertions, 1 deletions
diff --git a/app/services/favourite_service.rb b/app/services/favourite_service.rb
index 6e1ac3ba9..b565bcc32 100644
--- a/app/services/favourite_service.rb
+++ b/app/services/favourite_service.rb
@@ -37,6 +37,7 @@ class FavouriteService < BaseService
   end
 
   def bump_potential_friendship(account, status)
+    ActivityTracker.increment('activity:interactions')
     return if account.following?(status.account_id)
     PotentialFriendshipTracker.record(account.id, status.account_id, :favourite)
   end
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index a27f28ef6..52d49a69e 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -86,7 +86,9 @@ class PostStatusService < BaseService
   end
 
   def bump_potential_friendship(account, status)
-    return if !status.reply? || account.following?(status.in_reply_to_account_id)
+    return if !status.reply? || account.id == status.in_reply_to_account_id
+    ActivityTracker.increment('activity:interactions')
+    return if account.following?(status.in_reply_to_account_id)
     PotentialFriendshipTracker.record(account.id, status.in_reply_to_account_id, :reply)
   end
 end
diff --git a/app/services/reblog_service.rb b/app/services/reblog_service.rb
index 955a2bdbc..03db27406 100644
--- a/app/services/reblog_service.rb
+++ b/app/services/reblog_service.rb
@@ -47,6 +47,7 @@ class ReblogService < BaseService
   end
 
   def bump_potential_friendship(account, reblog)
+    ActivityTracker.increment('activity:interactions')
     return if account.following?(reblog.reblog.account_id)
     PotentialFriendshipTracker.record(account.id, reblog.reblog.account_id, :reblog)
   end