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-02-11 15:43:09 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-11 15:43:09 +0100
commite6408b2e7ade3dac8dcf14bcda5b5c6a159fa74c (patch)
tree7ba827f801bea1556231d275a6a8a35471f8a954 /app/services/process_mentions_service.rb
parent0afed995ce60dec11bc7718f83ca5afde86f6228 (diff)
parent446aad4ce2cb7afd0ba8e4b508e4dcba57eac790 (diff)
Merge branch 'feature-privacy-federation' into development
Diffstat (limited to 'app/services/process_mentions_service.rb')
-rw-r--r--app/services/process_mentions_service.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb
index 72568e702..d3d3af8af 100644
--- a/app/services/process_mentions_service.rb
+++ b/app/services/process_mentions_service.rb
@@ -1,6 +1,8 @@
 # frozen_string_literal: true
 
 class ProcessMentionsService < BaseService
+  include StreamEntryRenderer
+
   # Scan status for mentions and fetch remote mentioned users, create
   # local mention pointers, send Salmon notifications to mentioned
   # remote users
@@ -28,12 +30,10 @@ class ProcessMentionsService < BaseService
     status.mentions.each do |mention|
       mentioned_account = mention.account
 
-      next if status.private_visibility? && (!mentioned_account.following?(status.account) || !mentioned_account.local?)
-
       if mentioned_account.local?
         NotifyService.new.call(mentioned_account, mention)
       else
-        NotificationWorker.perform_async(status.stream_entry.id, mentioned_account.id)
+        NotificationWorker.perform_async(stream_entry_to_xml(status.stream_entry), status.account_id, mentioned_account.id)
       end
     end
   end