From 0526e546c900ef7fba0d155ff047f9ff4f242242 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 9 Nov 2020 12:28:36 -0600 Subject: [PATCH] Removed unused ActivityPub workers in status PinsController MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Removed: - unused ActivityPub workers in status PinsController --- .../api/v1/statuses/pins_controller.rb | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/app/controllers/api/v1/statuses/pins_controller.rb b/app/controllers/api/v1/statuses/pins_controller.rb index 4118a8ce..f9f135d8 100644 --- a/app/controllers/api/v1/statuses/pins_controller.rb +++ b/app/controllers/api/v1/statuses/pins_controller.rb @@ -11,7 +11,6 @@ class Api::V1::Statuses::PinsController < Api::BaseController def create StatusPin.create!(account: current_account, status: @status) - distribute_add_activity! render json: @status, serializer: REST::StatusSerializer end @@ -20,7 +19,6 @@ class Api::V1::Statuses::PinsController < Api::BaseController if pin pin.destroy! - distribute_remove_activity! end render json: @status, serializer: REST::StatusSerializer @@ -32,23 +30,4 @@ class Api::V1::Statuses::PinsController < Api::BaseController @status = Status.find(params[:status_id]) end - def distribute_add_activity! - json = ActiveModelSerializers::SerializableResource.new( - @status, - serializer: ActivityPub::AddSerializer, - adapter: ActivityPub::Adapter - ).as_json - - ActivityPub::RawDistributionWorker.perform_async(Oj.dump(json), current_account.id) - end - - def distribute_remove_activity! - json = ActiveModelSerializers::SerializableResource.new( - @status, - serializer: ActivityPub::RemoveSerializer, - adapter: ActivityPub::Adapter - ).as_json - - ActivityPub::RawDistributionWorker.perform_async(Oj.dump(json), current_account.id) - end end