diff options
Diffstat (limited to 'app/services/process_feed_service.rb')
-rw-r--r-- | app/services/process_feed_service.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index 5e760bc75..47992b246 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -57,7 +57,11 @@ class ProcessFeedService < BaseService # and tidier links.each do |mention_link| - href = Addressable::URI.parse(mention_link.attribute('href').value) + href_val = mention_link.attribute('href').value + + next if href_val == 'http://activityschema.org/collection/public' + + href = Addressable::URI.parse(href_val) if href.host == Rails.configuration.x.local_domain # A local user is mentioned @@ -72,6 +76,10 @@ class ProcessFeedService < BaseService # This is kinda dodgy because URLs could change, we don't index them mentioned_account = Account.find_by(url: href.to_s) + if mentioned_account.nil? + mentioned_account = FetchRemoteAccountService.new.(href) + end + unless mentioned_account.nil? mentioned_account.mentions.where(status: status).first_or_create(status: status) end |