Improve filtering of public/hashtag timelines, both in backlog and real-time
This commit is contained in:
parent
c5e03a2e0d
commit
17903c6dae
4 changed files with 32 additions and 8 deletions
|
@ -14,6 +14,8 @@ class FeedManager
|
|||
filter_from_home?(status, receiver)
|
||||
elsif timeline_type == :mentions
|
||||
filter_from_mentions?(status, receiver)
|
||||
elsif timeline_type == :public
|
||||
filter_from_public?(status, receiver)
|
||||
else
|
||||
false
|
||||
end
|
||||
|
@ -80,4 +82,16 @@ class FeedManager
|
|||
should_filter = should_filter || receiver.blocking?(status.account) # or it's from someone I blocked
|
||||
should_filter
|
||||
end
|
||||
|
||||
def filter_from_public?(status, receiver)
|
||||
should_filter = receiver.blocking?(status.account)
|
||||
|
||||
if status.reply? && !status.thread.account.nil?
|
||||
should_filter = should_filter || receiver.blocking?(status.thread.account)
|
||||
elsif status.reblog?
|
||||
should_filter = should_filter || receiver.blocking?(status.reblog.account)
|
||||
end
|
||||
|
||||
should_filter
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue