diff options
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/activitypub/fetch_account_statuses_service.rb | 4 |
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}") |