Fix account timeline with exclude_direct also excluding followers-only posts for non-followed users (#41019)

This commit is contained in:
Claire committed 2026-10-28 18:56:11 +01:00
1 parent 9646b20884
commit 8d1f1b960f
1 file changed
+5 -2
+5 -2
View File
@@ -48,8 +48,11 @@ class AccountStatusesFilter
def filtered_scope
scope = account.statuses
if exclude_direct?
scope = visibility_scope(scope)
if exclude_direct? && follower?
scope = scope.list_eligible_visibility
elsif exclude_direct?
scope = account.statuses.left_outer_joins(:mentions)
scope.merge!(scope.distributable_visibility.or(scope.where(visibility: :private).where(mentions: { account_id: current_account.id })).group(Status.arel_table[:id]))
else
scope = account.statuses.left_outer_joins(:mentions)
scope.merge!(visibility_scope(scope).or(scope.where(mentions: { account_id: current_account.id })).group(Status.arel_table[:id]))