diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-28 12:59:08 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:20 -0500 |
commit | 1f6fd82f9ec28390f8b2422336fe5505115a453d (patch) | |
tree | c0fb83e0134ffcb77669f5295e999aed0abc821c | |
parent | 8bf2aaf0e9e8290bcbc979471638d2e69b2d73b5 (diff) |
[Privacy] Exclude unlisted posts from RSS feeds
-rw-r--r-- | app/controllers/accounts_controller.rb | 8 |
1 files 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 |