about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-07 00:06:40 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-07 00:06:40 +0100
commitac035108aaa2585af146fc28e4a2314c06e63e65 (patch)
tree61c7bc0a34792d1d7378e71d80f7f2670eeae8b3 /app/models
parentc8252759df98f41860b0580b029d9efa374c7125 (diff)
Add "clear notifications" button, exclude posts from people who have blocked *you* from public/hashtag timelines
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 142dec64e..6ef0b2bdd 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -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