diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index 9270117dad..1cc5aa32ee 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -77,6 +77,7 @@ class Api::V1::StatusesController < Api::BaseController authorize @status, :destroy? @status.discard + StatusPin.find_by(status: @status)&.destroy @status.account.statuses_count = @status.account.statuses_count - 1 json = render_to_body json: @status, serializer: REST::StatusSerializer, source_requested: true diff --git a/app/services/remove_status_service.rb b/app/services/remove_status_service.rb index 8dc521eedf..f9fdea2cb0 100644 --- a/app/services/remove_status_service.rb +++ b/app/services/remove_status_service.rb @@ -21,6 +21,8 @@ class RemoveStatusService < BaseService with_lock("distribute:#{@status.id}") do @status.discard + StatusPin.find_by(status: @status)&.destroy + remove_from_self if @account.local? remove_from_followers remove_from_lists