Skip to content
Snippets Groups Projects
Unverified Commit 59b42188 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Filter out blocked/muted people from profile timelines (#7747)

Fix #7741
parent 68370783
No related branches found
No related tags found
No related merge requests found
...@@ -305,7 +305,11 @@ class Status < ApplicationRecord ...@@ -305,7 +305,11 @@ class Status < ApplicationRecord
# non-followers can see everything that isn't private/direct, but can see stuff they are mentioned in. # non-followers can see everything that isn't private/direct, but can see stuff they are mentioned in.
visibility.push(:private) if account.following?(target_account) visibility.push(:private) if account.following?(target_account)
where(visibility: visibility).or(where(id: account.mentions.select(:status_id))) scope = left_outer_joins(:reblog)
scope.where(visibility: visibility)
.or(scope.where(id: account.mentions.select(:status_id)))
.merge(scope.where(reblog_of_id: nil).or(scope.where.not(reblogs_statuses: { account_id: account.excluded_from_timeline_account_ids })))
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment