From 6c374b51537126a2cba29f3eaf74faf1fc64ba96 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 6 May 2019 20:51:20 -0500 Subject: Drop OStatus support. Fix some of the Rspec tests. --- app/services/process_mentions_service.rb | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'app/services/process_mentions_service.rb') diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb index 0d5f44a53..f0d3d5fcb 100644 --- a/app/services/process_mentions_service.rb +++ b/app/services/process_mentions_service.rb @@ -1,11 +1,8 @@ # frozen_string_literal: true class ProcessMentionsService < BaseService - include StreamEntryRenderer - # Scan status for mentions and fetch remote mentioned users, create - # local mention pointers, send Salmon notifications to mentioned - # remote users + # local mention pointers # @param [Status] status def call(status) return unless status.local? && !status.draft? @@ -40,7 +37,7 @@ class ProcessMentionsService < BaseService private def mention_undeliverable?(mentioned_account) - mentioned_account.nil? || (!mentioned_account.local? && mentioned_account.ostatus? && @status.stream_entry.hidden?) + mentioned_account.nil? end def create_notification(mention) @@ -48,17 +45,11 @@ class ProcessMentionsService < BaseService if mentioned_account.local? LocalNotificationWorker.perform_async(mentioned_account.id, mention.id, mention.class.name) - elsif mentioned_account.ostatus? && !@status.stream_entry.hidden? && !@status.local_only? - NotificationWorker.perform_async(ostatus_xml, @status.account_id, mentioned_account.id) - elsif mentioned_account.activitypub? && !@status.local_only? + elsif !@status.local_only? ActivityPub::DeliveryWorker.perform_async(activitypub_json, mention.status.account_id, mentioned_account.inbox_url) end end - def ostatus_xml - @ostatus_xml ||= stream_entry_to_xml(@status.stream_entry) - end - def activitypub_json return @activitypub_json if defined?(@activitypub_json) payload = ActiveModelSerializers::SerializableResource.new( -- cgit