Use with_domain scope in ReportService (#38758)
This commit is contained in:
1 parent
d82bada742
commit
055b739b88
1 file changed
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user