about summary refs log tree commit diff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2022-08-26 18:09:33 -0500
committerStarfall <us@starfall.systems>2022-08-26 18:09:33 -0500
commitb581e6b6d4a5ba9ed4ae17427b7f2d5d158be4e5 (patch)
tree06c3f6859d5cee4794d678a0aa57d15c31036ce4 /app/models/concerns
parent3871928aa4f660cdf1a0c451ac3396052b59ddea (diff)
parent978dd7e73c911441503ff803ffdce544ce50a33d (diff)
Merge remote-tracking branch 'glitch/main'
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