summaryrefslogtreecommitdiffstats
path: root/app/services/process_interaction_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/process_interaction_service.rb')
-rw-r--r--app/services/process_interaction_service.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/services/process_interaction_service.rb b/app/services/process_interaction_service.rb
index ee04f01af39..3a8332118ed 100644
--- a/app/services/process_interaction_service.rb
+++ b/app/services/process_interaction_service.rb
@@ -1,6 +1,7 @@
-class ProcessInteractionService
- include ApplicationHelper
-
+class ProcessInteractionService < BaseService
+ # Record locally the remote interaction with our user
+ # @param [String] envelope Salmon envelope
+ # @param [Account] target_account Account the Salmon was addressed to
def call(envelope, target_account)
body = salmon.unpack(envelope)
xml = Nokogiri::XML(body)
@@ -75,14 +76,14 @@ class ProcessInteractionService
end
def salmon
- OStatus2::Salmon.new
+ @salmon ||= OStatus2::Salmon.new
end
def follow_remote_account_service
- FollowRemoteAccountService.new
+ @follow_remote_account_service ||= FollowRemoteAccountService.new
end
def process_feed_service
- ProcessFeedService.new
+ @process_feed_service ||= ProcessFeedService.new
end
end