about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-14 20:14:53 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-14 20:15:37 +0200
commit91144d46ecc1a6e2d39abe8bea2d62c5cb57aca3 (patch)
tree5c38225960ddb7fffedd9686a3c6644c85aa5343
parent244d1307a3d5172230d93e74741e534772200bf0 (diff)
Fix duplication of media attachments when a remote status reblogs a local one
-rw-r--r--app/services/process_feed_service.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb
index 1efa0e15a..2f53b9c77 100644
--- a/app/services/process_feed_service.rb
+++ b/app/services/process_feed_service.rb
@@ -56,6 +56,8 @@ class ProcessFeedService < BaseService
   end
 
   def record_remote_mentions(status, links)
+    return if status.local?
+
     # 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
     # using acct:username@domain only! It would make things so much easier
@@ -93,6 +95,8 @@ class ProcessFeedService < BaseService
   end
 
   def process_attachments(entry, status)
+    return if status.local?
+
     entry.xpath('./xmlns:link[@rel="enclosure"]').each do |enclosure_link|
       next if enclosure_link.attribute('href').nil?