Prevent global anon blocks blocking every anon question with a user
This commit is contained in:
parent
04f53f356d
commit
00e677886f
|
@ -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 New Issue