diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-11-18 04:04:12 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-11-18 04:04:12 -0600 |
commit | 7cc9f12177dbea780f8071c89cd00837605ccc95 (patch) | |
tree | 517a1aa4e729617641d6f793f1389c8bc552fdba /app/models | |
parent | 80fe01c300dde9c101dde1c84fa7a10e0d86cb9a (diff) |
In the regex filtering query, `ANY` should actually be `ALL`.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/status.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index b2330c3dd..5f19eaff2 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -119,7 +119,7 @@ class Status < ApplicationRecord scope :mention_not_excluded_by_account, ->(account) { left_outer_joins(:mentions).where('mentions.account_id IS NULL OR mentions.account_id NOT IN (?)', account.excluded_from_timeline_account_ids) } scope :not_domain_blocked_by_account, ->(account) { account.excluded_from_timeline_domains.blank? ? left_outer_joins(:account) : left_outer_joins(:account).where('accounts.domain IS NULL OR accounts.domain NOT IN (?)', account.excluded_from_timeline_domains) } - scope :not_string_filtered_by_account, ->(account) { where("statuses.normalized_text !~ ANY(ARRAY(SELECT f_normalize(phrase) FROM custom_filters WHERE account_id = ?))", account.id) } + scope :not_string_filtered_by_account, ->(account) { where("statuses.normalized_text !~ ALL(ARRAY(SELECT f_normalize(phrase) FROM custom_filters WHERE account_id = ?))", account.id) } scope :not_missing_media_desc, -> { left_outer_joins(:media_attachments).where('media_attachments.id IS NULL OR media_attachments.description IS NOT NULL') } scope :tagged_with_all, ->(tags) { |