Add support for FASP data sharing (#34415)
This commit is contained in:
parent
3ea1f074ab
commit
a5a2c6dc7e
38 changed files with 1140 additions and 1 deletions
17
app/models/concerns/favourite/fasp_concern.rb
Normal file
17
app/models/concerns/favourite/fasp_concern.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Favourite::FaspConcern
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
after_commit :announce_trends_to_subscribed_fasp, on: :create
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def announce_trends_to_subscribed_fasp
|
||||
return unless Mastodon::Feature.fasp_enabled?
|
||||
|
||||
Fasp::AnnounceTrendWorker.perform_async(status_id, 'favourite')
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue