diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-12-11 20:04:53 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-12-11 20:04:53 -0600 |
commit | 9a435494c2efdd2ca8fc7f5fa3dbb81bf88633a1 (patch) | |
tree | 376b3fa1570b7d0abf85e5580cc48eecdc407129 /app/helpers | |
parent | 3dc62460b00acea03d6010b08677031332399d2c (diff) |
move normalized text into own table
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/filter_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/filter_helper.rb b/app/helpers/filter_helper.rb index e5144b981..db2652557 100644 --- a/app/helpers/filter_helper.rb +++ b/app/helpers/filter_helper.rb @@ -7,7 +7,7 @@ module FilterHelper status = status.reblog if status.reblog? - if Status.where(id: status.id).where("statuses.normalized_text ~ ANY(ARRAY(SELECT f_normalize(phrase) FROM custom_filters WHERE account_id = ?))", receiver_id).exists? + if Status.where(id: status.id).regex_filtered_by_account(receiver_id).exists? redis.sadd("filtered_statuses:#{receiver_id}", status.id) return true end |