mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Hide local-only pinned toots from public profiles
Fixes #1336 This also fixes federating pinned toots when some of them are local-only. Public profiles will not show public toots, whether you are logged in or not (this is consistent with local-only toots that are not pinned).
This commit is contained in:
parent
ddcd9fe9f0
commit
18f2c39074
@ -27,7 +27,7 @@ class AccountsController < ApplicationController
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@pinned_statuses = cache_collection(@account.pinned_statuses, Status) if show_pinned_statuses?
|
@pinned_statuses = cache_collection(@account.pinned_statuses.not_local_only, Status) if show_pinned_statuses?
|
||||||
@statuses = filtered_status_page
|
@statuses = filtered_status_page
|
||||||
@statuses = cache_collection(@statuses, Status)
|
@statuses = cache_collection(@statuses, Status)
|
||||||
@rss_url = rss_url
|
@rss_url = rss_url
|
||||||
|
@ -24,7 +24,7 @@ class ActivityPub::CollectionsController < ActivityPub::BaseController
|
|||||||
def set_size
|
def set_size
|
||||||
case params[:id]
|
case params[:id]
|
||||||
when 'featured'
|
when 'featured'
|
||||||
@size = @account.pinned_statuses.count
|
@size = @account.pinned_statuses.not_local_only.count
|
||||||
else
|
else
|
||||||
not_found
|
not_found
|
||||||
end
|
end
|
||||||
@ -39,7 +39,7 @@ class ActivityPub::CollectionsController < ActivityPub::BaseController
|
|||||||
if authorized_fetch_mode? && !signed_request_account.nil? && (@account.blocking?(signed_request_account) || (!signed_request_account.domain.nil? && @account.domain_blocking?(signed_request_account.domain)))
|
if authorized_fetch_mode? && !signed_request_account.nil? && (@account.blocking?(signed_request_account) || (!signed_request_account.domain.nil? && @account.domain_blocking?(signed_request_account.domain)))
|
||||||
Status.none
|
Status.none
|
||||||
else
|
else
|
||||||
@account.pinned_statuses
|
@account.pinned_statuses.not_local_only
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user