# Only continue if the status is supposed to have
# arrived in real-time
- return unless @options[:override_timestamps]
+ return unless @options[:override_timestamps] || status.within_realtime_window?
distribute_to_followers(status)
end
Rails.logger.debug "Queuing remote status #{status.id} (#{id}) for distribution"
LinkCrawlWorker.perform_async(status.id) unless status.spoiler_text?
- DistributionWorker.perform_async(status.id) if @options[:override_timestamps]
+ DistributionWorker.perform_async(status.id) if @options[:override_timestamps] || status.within_realtime_window?
status
end
delegate :domain, to: :account, prefix: true
+ REAL_TIME_WINDOW = 6.hours
+
def searchable_by(preloaded = nil)
ids = [account_id]
!reblog_of_id.nil?
end
+ def within_realtime_window?
+ created_at >= REAL_TIME_WINDOW.ago
+ end
+
def verb
if destroyed?
:delete