about summary refs log tree commit diff
path: root/app/services/activitypub
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-12-10 01:43:12 -0600
committermultiple creatures <dev@multiple-creature.party>2019-12-10 02:36:38 -0600
commitae16b3b466d8afa59a890cb81d1c1e9e189372a8 (patch)
tree1638c5e18f1221b0428be6fc2c0ee09b515cbb72 /app/services/activitypub
parent5af281b0578c0752a1d08ebd697719387aee7e6e (diff)
do not override timestamps when syncing
Diffstat (limited to 'app/services/activitypub')
-rw-r--r--app/services/activitypub/fetch_account_statuses_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/activitypub/fetch_account_statuses_service.rb b/app/services/activitypub/fetch_account_statuses_service.rb
index 27fa8bd6c..5e0be233e 100644
--- a/app/services/activitypub/fetch_account_statuses_service.rb
+++ b/app/services/activitypub/fetch_account_statuses_service.rb
@@ -14,7 +14,7 @@ class ActivityPub::FetchAccountStatusesService < BaseService
 
     @items = Rails.cache.fetch(sync_key) || []
 
-    return if redis.get(cooldown_key) && @items.empty?
+    return if redis.get(cooldown_key).present? && @items.empty?
     redis.set(cooldown_key, 1, ex: 1.day)
 
     @json = fetch_collection(url || account.outbox_url)
@@ -91,7 +91,7 @@ class ActivityPub::FetchAccountStatusesService < BaseService
 
   def process_item(item)
     return unless item.is_a?(Hash) && item['type'].present?
-    ActivityPub::Activity.factory(item, @account, override_timestamps: true, requested: true)&.perform
+    ActivityPub::Activity.factory(item, @account, requested: true)&.perform
   rescue => e
     Rails.logger.error("Failed to process #{item['type']} #{item['id']} due to #{e}: #{e.message}")
     Rails.logger.error("Stack trace: #{backtrace.map {|l| "  #{l}\n"}.join}")