diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-28 14:26:26 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-28 14:26:26 +0100 |
commit | ad5ae3f60e5e0745912bfbc0926f6cf8bc6e9eb4 (patch) | |
tree | 628535474e7f446869cab55f8cdcde56798229be /app/services/process_feed_service.rb | |
parent | 2825991e09272d6e7227da9d9b8dc387614a83df (diff) |
Update profile information and download avatar of remote accounts
Diffstat (limited to 'app/services/process_feed_service.rb')
-rw-r--r-- | app/services/process_feed_service.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index 6ce74e32d..1c85942f3 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -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 |