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/api/v1/accounts/statuses_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/controllers/api/v1/accounts') diff --git a/app/controllers/api/v1/accounts/statuses_controller.rb b/app/controllers/api/v1/accounts/statuses_controller.rb index 11661ce08..914a39801 100644 --- a/app/controllers/api/v1/accounts/statuses_controller.rb +++ b/app/controllers/api/v1/accounts/statuses_controller.rb @@ -57,7 +57,11 @@ class Api::V1::Accounts::StatusesController < Api::BaseController end def pinned_scope - @account.pinned_statuses + if user_signed_in? && current_account.following?(@account) + @account.pinned_statuses + else + @account.pinned_statuses.where.not(visibility: :private) + end end def no_replies_scope -- cgit