Skip to content
Snippets Groups Projects
Commit f63f0c46 authored by Eugen's avatar Eugen Committed by GitHub
Browse files

Fix too late return

parent 7cde08e3
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,8 @@ class ProcessFeedService < BaseService ...@@ -44,6 +44,8 @@ class ProcessFeedService < BaseService
Rails.logger.debug "Creating remote status #{id}" Rails.logger.debug "Creating remote status #{id}"
status = status_from_xml(@xml) status = status_from_xml(@xml)
return if status.nil?
if verb == :share if verb == :share
original_status = status_from_xml(@xml.at_xpath('.//activity:object', activity: TagManager::AS_XMLNS)) original_status = status_from_xml(@xml.at_xpath('.//activity:object', activity: TagManager::AS_XMLNS))
status.reblog = original_status status.reblog = original_status
...@@ -56,8 +58,6 @@ class ProcessFeedService < BaseService ...@@ -56,8 +58,6 @@ class ProcessFeedService < BaseService
end end
end end
return if status.nil?
status.save! status.save!
NotifyService.new.call(status.reblog.account, status) if status.reblog? && status.reblog.account.local? NotifyService.new.call(status.reblog.account, status) if status.reblog? && status.reblog.account.local?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment