Change featured tag updates to add/remove activity (#19409)
* Change featured tag updates to add/remove activity * Fix to check for the existence of feature tag * Rename service and worker * Merge AddHashtagSerializer with AddSerializer * Undo removal of sidekiq_options
This commit is contained in:
parent
73a48318a1
commit
74ead7d106
10 changed files with 117 additions and 15 deletions
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::AccountRawDistributionWorker < ActivityPub::RawDistributionWorker
|
||||
protected
|
||||
|
||||
def inboxes
|
||||
@inboxes ||= AccountReachFinder.new(@account).inboxes
|
||||
end
|
||||
end
|
11
app/workers/remove_featured_tag_worker.rb
Normal file
11
app/workers/remove_featured_tag_worker.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RemoveFeaturedTagWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(account_id, featured_tag_id)
|
||||
RemoveFeaturedTagService.new.call(Account.find(account_id), FeaturedTag.find(featured_tag_id))
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue