so that public timeline/caching would not encounter incomplete dataremotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
parent
bda7391221
commit
4a4733b397
|
@ -47,25 +47,30 @@ class ProcessFeedService < BaseService
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
status, just_created = nil
|
||||||
|
|
||||||
Rails.logger.debug "Creating remote status #{id}"
|
Rails.logger.debug "Creating remote status #{id}"
|
||||||
status, just_created = status_from_xml(@xml)
|
|
||||||
|
|
||||||
return if status.nil?
|
ApplicationRecord.transaction do
|
||||||
return status unless just_created
|
status, just_created = status_from_xml(@xml)
|
||||||
|
|
||||||
if verb == :share
|
return if status.nil?
|
||||||
original_status = shared_status_from_xml(@xml.at_xpath('.//activity:object', activity: TagManager::AS_XMLNS))
|
return status unless just_created
|
||||||
status.reblog = original_status
|
|
||||||
|
|
||||||
if original_status.nil?
|
if verb == :share
|
||||||
status.destroy
|
original_status = shared_status_from_xml(@xml.at_xpath('.//activity:object', activity: TagManager::AS_XMLNS))
|
||||||
return nil
|
status.reblog = original_status
|
||||||
elsif original_status.reblog?
|
|
||||||
status.reblog = original_status.reblog
|
if original_status.nil?
|
||||||
|
status.destroy
|
||||||
|
return nil
|
||||||
|
elsif original_status.reblog?
|
||||||
|
status.reblog = original_status.reblog
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
status.save!
|
status.save!
|
||||||
|
end
|
||||||
|
|
||||||
notify_about_mentions!(status) unless status.reblog?
|
notify_about_mentions!(status) unless status.reblog?
|
||||||
notify_about_reblog!(status) if status.reblog? && status.reblog.account.local?
|
notify_about_reblog!(status) if status.reblog? && status.reblog.account.local?
|
||||||
|
|
Loading…
Reference in New Issue