diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-24 18:44:03 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-24 18:44:03 +0100 |
commit | c967802c4351f34d5c62e52b72c7d5c2d72ffba3 (patch) | |
tree | b673170c5b9e02b8aa3b1d96642c26bba592c04d /app/services | |
parent | 79609d62705fa7060c1d1ab78234b4aabdbd7e0f (diff) |
Notify remote users about mentions
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/post_status_service.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index e8fc6cdef..39bbe9f9e 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -9,6 +9,11 @@ class PostStatusService < BaseService next unless local_account.nil? follow_remote_account_service.("acct:#{match.first}") end + + status.mentions.each do |mentioned_account| + next if mentioned_account.local? + send_interaction_service.(status.stream_entry, mentioned_account) + end end private @@ -16,4 +21,8 @@ class PostStatusService < BaseService def follow_remote_account_service @follow_remote_account_service ||= FollowRemoteAccountService.new end + + def send_interaction_service + @send_interaction_service ||= SendInteractionService.new + end end |