about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-11-18 03:49:02 -0600
committermultiple creatures <dev@multiple-creature.party>2019-11-18 03:49:02 -0600
commita44eb4a79d6cf35accd23dc6cfeb63fbd5670e13 (patch)
treeb821389f3c95a659e8b35b414f9112358bbf51fa /app/helpers
parent953e00bc058abc58ebc2f1f7cfa6cd7679b87cba (diff)
Use custom `f_normalize` function for transforming regex filters.
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/filter_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/filter_helper.rb b/app/helpers/filter_helper.rb
index b2f1b00fc..e5144b981 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 unaccent(lower(phrase)) FROM custom_filters WHERE account_id = ?))", receiver_id).exists?
+    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?
       redis.sadd("filtered_statuses:#{receiver_id}", status.id)
       return true
     end