logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

deletion.rb (476B)


  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