Use with_domain scope in ReportService (#38758)
This commit is contained in:
parent
d82bada742
commit
055b739b88
@ -96,7 +96,7 @@ class ReportService < BaseService
|
||||
def domain_mentions(domain)
|
||||
Mention
|
||||
.joins(:account)
|
||||
.where(Account.arel_table[:domain].lower.eq domain)
|
||||
.merge(Account.with_domain(domain))
|
||||
.select(1).arel.exists
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user