From 1f6fd82f9ec28390f8b2422336fe5505115a453d Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Fri, 28 Aug 2020 12:59:08 -0500 Subject: [Privacy] Exclude unlisted posts from RSS feeds --- app/controllers/accounts_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 6e73ae16f..d3799b567 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -16,6 +16,8 @@ class AccountsController < ApplicationController skip_before_action :require_functional! # , unless: :whitelist_mode? def show + @without_unlisted = !@account.show_unlisted? + respond_to do |format| format.html do use_pack 'public' @@ -46,7 +48,8 @@ class AccountsController < ApplicationController expires_in 1.minute, public: !current_account? - limit = params[:limit].present? ? [params[:limit].to_i, PAGE_SIZE_MAX].min : PAGE_SIZE + @without_unlisted = true + limit = params[:limit].present? ? [params[:limit].to_i, PAGE_SIZE_MAX].min : PAGE_SIZE @statuses = filtered_statuses.without_reblogs.limit(limit) @statuses = cache_collection(@statuses, Status) render xml: RSS::AccountSerializer.render(@account, @statuses, params[:tag]) @@ -85,7 +88,8 @@ class AccountsController < ApplicationController include_reblogs: !(threads_requested? || replies_requested?), only_reblogs: reblogs_requested?, include_replies: replies_requested?, - tag: tag_requested? ? params[:tag] : nil + tag: tag_requested? ? params[:tag] : nil, + public: @without_unlisted ) end -- cgit