mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 12:29:54 +01:00
Use id
from source_user
inside query
With the proper presence check using `source_user_id` we guarantee `source_user` is there, and so we can use it like in the other query
This commit is contained in:
parent
1f401b2e1b
commit
099665022f
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,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, nil], user_id: [target_user.id, nil]).any?)
|
||||
end
|
||||
|
||||
def source_user
|
||||
|
|
Loading…
Reference in a new issue