about summary refs log tree commit diff
path: root/app/services/process_mentions_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-09-01 21:26:01 +0200
committerGitHub <noreply@github.com>2017-09-01 21:26:01 +0200
commit390bfec6da74218e2ebd4eea16dff586b25177d9 (patch)
treeef2284c5afd6cef15c7b1baec18927a091c08fe4 /app/services/process_mentions_service.rb
parentc2980d5b17d355985a6d5ac4eaa12371463363b3 (diff)
Avoid sending some ActivityPub payloads if the receiver will get them through distribution (#4739)
Diffstat (limited to 'app/services/process_mentions_service.rb')
-rw-r--r--app/services/process_mentions_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb
index f123bf869..dc386c9e7 100644
--- a/app/services/process_mentions_service.rb
+++ b/app/services/process_mentions_service.rb
@@ -41,7 +41,7 @@ class ProcessMentionsService < BaseService
       NotifyService.new.call(mentioned_account, mention)
     elsif mentioned_account.ostatus? && (Rails.configuration.x.use_ostatus_privacy || !status.stream_entry.hidden?)
       NotificationWorker.perform_async(stream_entry_to_xml(status.stream_entry), status.account_id, mentioned_account.id)
-    elsif mentioned_account.activitypub?
+    elsif mentioned_account.activitypub? && !mentioned_account.following?(status.account)
       ActivityPub::DeliveryWorker.perform_async(build_json(mention.status), mention.status.account_id, mentioned_account.inbox_url)
     end
   end