Use with_domain scope in ReportService (#38758)

This commit is contained in:
Matt Jankowski 2026-04-21 05:59:04 -04:00 committed by GitHub
parent d82bada742
commit 055b739b88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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