]> cat aescling's git repositories - mastodon.git/commitdiff
Improve process feed service
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 10 Oct 2016 13:27:39 +0000 (15:27 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 10 Oct 2016 13:27:39 +0000 (15:27 +0200)
app/services/process_feed_service.rb

index 4ed0bf0bb34fb356340ef8285b25e4be1d647646..ff626a0f14efe61a1d8167892e4628a7bd1a97e0 100644 (file)
@@ -34,12 +34,15 @@ class ProcessFeedService < BaseService
       else
         add_reply!(entry, status)
       end
+    else
+      return
     end
 
     # If we added a status, go through accounts it mentions and create respective relations
     # 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"]'))
+      record_remote_mentions(status.reblog, entry.xpath('./activity:object/xmlns:link[@rel="mentioned"]')) if status.reblog?
 
       process_attachments(entry, status)
       process_attachments(entry.xpath('./activity:object'), status.reblog) if status.reblog?