You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
476 B

  1. # frozen_string_literal: true
  2. class OStatus::Activity::Deletion < OStatus::Activity::Base
  3. def perform
  4. Rails.logger.debug "Deleting remote status #{id}"
  5. status = Status.find_by(uri: id, account: @account)
  6. status ||= Status.find_by(uri: activitypub_uri, account: @account) if activitypub_uri?
  7. if status.nil?
  8. redis.setex("delete_upon_arrival:#{@account.id}:#{id}", 6 * 3_600, id)
  9. else
  10. RemoveStatusService.new.call(status)
  11. end
  12. end
  13. end