Send Salmon interactions
This commit is contained in:
parent
10eb47a33e
commit
fa7868675d
15 changed files with 118 additions and 25 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue