about summary refs log tree commit diff
path: root/app/services/process_feed_service.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-06 20:51:20 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:23 -0500
commit6c374b51537126a2cba29f3eaf74faf1fc64ba96 (patch)
tree776239f0aaf7a0abed2d09440eccbb1d6d53a7a2 /app/services/process_feed_service.rb
parent6e8ec7f0a538b5383da49c4435835b78c61da0bc (diff)
Drop OStatus support. Fix some of the Rspec tests.
Diffstat (limited to 'app/services/process_feed_service.rb')
-rw-r--r--app/services/process_feed_service.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb
deleted file mode 100644
index 30a9dd85e..000000000
--- a/app/services/process_feed_service.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class ProcessFeedService < BaseService
-  def call(body, account, **options)
-    @options = options
-
-    xml = Nokogiri::XML(body)
-    xml.encoding = 'utf-8'
-
-    update_author(body, account)
-    process_entries(xml, account)
-  end
-
-  private
-
-  def update_author(body, account)
-    RemoteProfileUpdateWorker.perform_async(account.id, body.force_encoding('UTF-8'), true)
-  end
-
-  def process_entries(xml, account)
-    xml.xpath('//xmlns:entry', xmlns: OStatus::TagManager::XMLNS).reverse_each.map { |entry| process_entry(entry, account) }.compact
-  end
-
-  def process_entry(xml, account)
-    activity = OStatus::Activity::General.new(xml, account, @options)
-    activity.specialize&.perform if activity.status?
-  rescue ActiveRecord::RecordInvalid => e
-    Rails.logger.debug "Nothing was saved for #{activity.id} because: #{e}"
-    nil
-  end
-end