When status is fetched instead of delivered, do not stream it (#5437)

This commit is contained in:
Eugen Rochko 2017-10-17 20:05:21 +02:00 committed by GitHub
parent 3bc8924940
commit 484208ce12
2 changed files with 7 additions and 2 deletions

View File

@ -67,9 +67,14 @@ class ActivityPub::Activity
end end
def distribute(status) def distribute(status)
crawl_links(status)
# Only continue if the status is supposed to have
# arrived in real-time
return unless @options[:override_timestamps]
notify_about_reblog(status) if reblog_of_local_account?(status) notify_about_reblog(status) if reblog_of_local_account?(status)
notify_about_mentions(status) notify_about_mentions(status)
crawl_links(status)
distribute_to_followers(status) distribute_to_followers(status)
end end

View File

@ -56,7 +56,7 @@ class OStatus::Activity::Creation < OStatus::Activity::Base
Rails.logger.debug "Queuing remote status #{status.id} (#{id}) for distribution" Rails.logger.debug "Queuing remote status #{status.id} (#{id}) for distribution"
LinkCrawlWorker.perform_async(status.id) unless status.spoiler_text? LinkCrawlWorker.perform_async(status.id) unless status.spoiler_text?
DistributionWorker.perform_async(status.id) DistributionWorker.perform_async(status.id) if @options[:override_timestamps]
status status
end end