From 9a3c4bc0511d1c8a19ef591752be59fb9f3cdfd8 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 4 Aug 2019 20:53:20 -0500 Subject: restrict private pin visibility to packmates & do not include them in `featured` collection (mainline masto does not respect pin visibility) --- app/controllers/activitypub/collections_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/activitypub/collections_controller.rb') diff --git a/app/controllers/activitypub/collections_controller.rb b/app/controllers/activitypub/collections_controller.rb index 853f4f907..fb7976a39 100644 --- a/app/controllers/activitypub/collections_controller.rb +++ b/app/controllers/activitypub/collections_controller.rb @@ -35,7 +35,7 @@ class ActivityPub::CollectionsController < Api::BaseController def set_size case params[:id] when 'featured' - @account.pinned_statuses.count + @account.pinned_statuses.where.not(visibility: :private).count else raise ActiveRecord::RecordNotFound end @@ -45,7 +45,7 @@ class ActivityPub::CollectionsController < Api::BaseController case params[:id] when 'featured' @account.statuses.permitted_for(@account, signed_request_account).tap do |scope| - scope.merge!(@account.pinned_statuses) + scope.merge!(@account.pinned_statuses.where.not(visibility: :private)) end else raise ActiveRecord::RecordNotFound -- cgit