This repository has been archived on 2024-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/app/workers/remove_from_public_statuses...

16 lines
304 B
Ruby

# frozen_string_literal: true
class RemoveFromPublicStatusesIndexWorker
include Sidekiq::Worker
def perform(account_id)
account = Account.find(account_id)
return if account.indexable?
account.remove_from_public_statuses_index!
rescue ActiveRecord::RecordNotFound
true
end
end