mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 12:05:07 +01:00
Fix duplication of media attachments when a remote status reblogs a local one
This commit is contained in:
parent
244d1307a3
commit
91144d46ec
@ -56,6 +56,8 @@ class ProcessFeedService < BaseService
|
|||||||
end
|
end
|
||||||
|
|
||||||
def record_remote_mentions(status, links)
|
def record_remote_mentions(status, links)
|
||||||
|
return if status.local?
|
||||||
|
|
||||||
# Here we have to do a reverse lookup of local accounts by their URL!
|
# Here we have to do a reverse lookup of local accounts by their URL!
|
||||||
# It's not pretty at all! I really wish all these protocols sticked to
|
# It's not pretty at all! I really wish all these protocols sticked to
|
||||||
# using acct:username@domain only! It would make things so much easier
|
# using acct:username@domain only! It would make things so much easier
|
||||||
@ -93,6 +95,8 @@ class ProcessFeedService < BaseService
|
|||||||
end
|
end
|
||||||
|
|
||||||
def process_attachments(entry, status)
|
def process_attachments(entry, status)
|
||||||
|
return if status.local?
|
||||||
|
|
||||||
entry.xpath('./xmlns:link[@rel="enclosure"]').each do |enclosure_link|
|
entry.xpath('./xmlns:link[@rel="enclosure"]').each do |enclosure_link|
|
||||||
next if enclosure_link.attribute('href').nil?
|
next if enclosure_link.attribute('href').nil?
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user