about summary refs log tree commit diff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-08-25 05:07:39 +0200
committerClaire <claire.github-309c@sitedethib.com>2022-08-25 05:07:39 +0200
commit2d1d4210f9d394ea8e7357df08f8ca2cc925384a (patch)
treea5c69693d11b59a673b1981ea2d85bbc17991c42 /app/models/concerns
parent5a3d09dc8e30198b4d8d921ef0b1ba0a35fe01d9 (diff)
parent861b35dd54d266bc0a40b3cacb28e5b82ff6faaa (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/account_interactions.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/app/models/concerns/account_interactions.rb b/app/models/concerns/account_interactions.rb
index a7401362f..9b358d338 100644
--- a/app/models/concerns/account_interactions.rb
+++ b/app/models/concerns/account_interactions.rb
@@ -249,15 +249,7 @@ module AccountInteractions
 
   def status_matches_filters(status)
     active_filters = CustomFilter.cached_filters_for(id)
-
-    filter_matches = active_filters.filter_map do |filter, rules|
-      next if rules[:keywords].blank?
-
-      match = rules[:keywords].match(status.proper.searchable_text)
-      FilterResultPresenter.new(filter: filter, keyword_matches: [match.to_s]) unless match.nil?
-    end
-
-    filter_matches
+    CustomFilter.apply_cached_filters(active_filters, status)
   end
 
   def followers_for_local_distribution