From 3366a957219b15f5ab6f6eabbf5466e1e12082de Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Mon, 20 Jul 2020 03:58:14 -0500 Subject: [Feature] Add command tags; add #!edit and #!publish commands for mobile users --- app/controllers/api/v1/statuses/publishing_controller.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'app/controllers/api/v1/statuses') 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), -- cgit