From 4b384d69147fdc5b0231e23a6fec7891bcfb8e21 Mon Sep 17 00:00:00 2001 From: Eugen Date: Sat, 14 Jan 2017 02:22:16 +0100 Subject: [PATCH] Fix too late return --- app/services/process_feed_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index f085fcd8e3..cc35e65b8a 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -44,6 +44,8 @@ class ProcessFeedService < BaseService Rails.logger.debug "Creating remote status #{id}" status = status_from_xml(@xml) + return if status.nil? + if verb == :share original_status = status_from_xml(@xml.at_xpath('.//activity:object', activity: TagManager::AS_XMLNS)) status.reblog = original_status @@ -56,8 +58,6 @@ class ProcessFeedService < BaseService end end - return if status.nil? - status.save! NotifyService.new.call(status.reblog.account, status) if status.reblog? && status.reblog.account.local?