diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-08-04 20:53:20 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-08-04 20:53:20 -0500 |
commit | 9a3c4bc0511d1c8a19ef591752be59fb9f3cdfd8 (patch) | |
tree | 736cdbb3657d8c02c2ab6ffe1ece2ff480a0540b /app/controllers/activitypub | |
parent | 9ba20817205de7bf46489ab2a0d834f798031d20 (diff) |
restrict private pin visibility to packmates & do not include them in `featured` collection (mainline masto does not respect pin visibility)
Diffstat (limited to 'app/controllers/activitypub')
-rw-r--r-- | app/controllers/activitypub/collections_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |