From 04e405d0a420ce9cb722e9a2c28fc6276dc1e289 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Tue, 11 Aug 2020 13:17:47 -0500 Subject: [Privacy, Bug] Exclude unpublished statuses and replies from timeline generation --- app/lib/feed_manager.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/lib') diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index f03d9d5af..b8ff7b0f8 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -197,7 +197,7 @@ class FeedManager next if last_status_score < oldest_home_score end - statuses = target_account.statuses.where(visibility: [:public, :unlisted, :private]).includes(:preloadable_poll, reblog: :account).limit(limit) + statuses = target_account.statuses.published.without_replies.where(visibility: [:public, :unlisted, :private]).includes(:preloadable_poll, reblog: :account).limit(limit) crutches = build_crutches(account.id, statuses) statuses.each do |status| @@ -244,6 +244,7 @@ class FeedManager def filter_from_home?(status, receiver_id, crutches) return false if receiver_id == status.account_id + return true unless status.published? return true if status.reply? && (status.in_reply_to_id.nil? || status.in_reply_to_account_id.nil?) return true if phrase_filtered?(status, receiver_id, :home) -- cgit