Refactored generation of unique tags, URIs and object URLs into own classes,
as well as formatting of content
This commit is contained in:
parent
735b4cc62e
commit
3cc47beb6e
28 changed files with 316 additions and 180 deletions
|
@ -39,10 +39,10 @@ class ProcessFeedService < BaseService
|
|||
# Also record all media attachments for the status and for the reblogged status if present
|
||||
unless status.new_record?
|
||||
record_remote_mentions(status, entry.xpath('./xmlns:link[@rel="mentioned"]'))
|
||||
|
||||
|
||||
process_attachments(entry, status)
|
||||
process_attachments(entry.xpath('./activity:object'), status.reblog) if status.reblog?
|
||||
|
||||
|
||||
DistributionWorker.perform_async(status.id)
|
||||
end
|
||||
end
|
||||
|
@ -112,8 +112,8 @@ class ProcessFeedService < BaseService
|
|||
def find_original_status(_xml, id)
|
||||
return nil if id.nil?
|
||||
|
||||
if local_id?(id)
|
||||
Status.find(unique_tag_to_local_id(id, 'Status'))
|
||||
if TagManager.instance.local_id?(id)
|
||||
Status.find(TagManager.instance.unique_tag_to_local_id(id, 'Status'))
|
||||
else
|
||||
Status.find_by(uri: id)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue