mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:39:52 +01:00
Merge pull request #948 from Retrospring/bugfix/global-mute-everything
Prevent global anon blocks blocking every anon question with a user
This commit is contained in:
commit
e8780783b5
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ module UseCase
|
|||
def filtered?(question)
|
||||
target_user.mute_rules.any? { |rule| rule.applies_to? question } ||
|
||||
(anonymous && AnonymousBlock.where(identifier: question.author_identifier, user_id: [target_user.id, nil]).any?) ||
|
||||
(source_user_id && anonymous && AnonymousBlock.where(target_user_id: [source_user.id, nil], user_id: [target_user.id, nil]).any?) ||
|
||||
(source_user_id && anonymous && AnonymousBlock.where(target_user_id: source_user.id, user_id: [target_user.id, nil]).any?) ||
|
||||
(source_user_id && target_user.muting?(source_user))
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue