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.
19 lines
453 B
19 lines
453 B
2 years ago
|
# frozen_string_literal: true
|
||
|
|
||
|
class RemoveFeaturedTagService < BaseService
|
||
|
include Payloadable
|
||
|
|
||
|
def call(account, featured_tag)
|
||
|
@account = account
|
||
|
|
||
|
featured_tag.destroy!
|
||
|
ActivityPub::AccountRawDistributionWorker.perform_async(build_json(featured_tag), account.id) if @account.local?
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def build_json(featured_tag)
|
||
|
Oj.dump(serialize_payload(featured_tag, ActivityPub::RemoveSerializer, signer: @account))
|
||
|
end
|
||
|
end
|