Add "clear notifications" button, exclude posts from people who have blocked *you* from public/hashtag timelines
This commit is contained in:
parent
c8252759df
commit
ac035108aa
6 changed files with 54 additions and 3 deletions
|
@ -161,7 +161,7 @@ class Status < ApplicationRecord
|
|||
private
|
||||
|
||||
def filter_timeline(query, account)
|
||||
blocked = Block.where(account: account).pluck(:target_account_id)
|
||||
blocked = Block.where(account: account).pluck(:target_account_id) + Block.where(target_account: account).pluck(:account_id)
|
||||
query = query.where('statuses.account_id NOT IN (?)', blocked) unless blocked.empty?
|
||||
query = query.where('accounts.silenced = TRUE') if account.silenced?
|
||||
query
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue