diff options
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/v1/statuses/publishing_controller.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/controllers/api/v1/statuses/publishing_controller.rb b/app/controllers/api/v1/statuses/publishing_controller.rb index 5124b1009..97c052e22 100644 --- a/app/controllers/api/v1/statuses/publishing_controller.rb +++ b/app/controllers/api/v1/statuses/publishing_controller.rb @@ -8,14 +8,7 @@ class Api::V1::Statuses::PublishingController < Api::BaseController before_action :set_status def create - @status.update!(published: true) - - LinkCrawlWorker.perform_in(rand(1..30).seconds, @status.id) unless @status.spoiler_text? - DistributionWorker.perform_async(@status.id) - ActivityPub::DistributionWorker.perform_async(@status.id) if @status.local? && !@status.local_only? - - mentions = @status.active_mentions.includes(:account).where(id: @new_mention_ids, accounts: { domain: nil }) - mentions.each { |mention| LocalNotificationWorker.perform_async(mention.account.id, mention.id, mention.class.name) } + PublishStatusService.new.call(@status) render json: @status, serializer: (@status.is_a?(ScheduledStatus) ? REST::ScheduledStatusSerializer : REST::StatusSerializer), |