Update profile information and download avatar of remote accounts
This commit is contained in:
parent
2825991e09
commit
ad5ae3f60e
9 changed files with 87 additions and 18 deletions
|
@ -5,6 +5,10 @@ class ProcessFeedService < BaseService
|
|||
def call(body, account)
|
||||
xml = Nokogiri::XML(body)
|
||||
|
||||
unless xml.at_xpath('/xmlns:feed').nil?
|
||||
update_remote_profile_service.(xml.at_xpath('/xmlns:feed/xmlns:author'), account)
|
||||
end
|
||||
|
||||
xml.xpath('//xmlns:entry').each do |entry|
|
||||
next unless [:note, :comment, :activity].includes? object_type(entry)
|
||||
|
||||
|
@ -126,4 +130,8 @@ class ProcessFeedService < BaseService
|
|||
def process_mentions_service
|
||||
@process_mentions_service ||= ProcessMentionsService.new
|
||||
end
|
||||
|
||||
def update_remote_profile_service
|
||||
@update_remote_profile_service ||= UpdateRemoteProfileService.new
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue