diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-08-02 02:30:35 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-08-02 02:30:35 -0500 |
commit | 65c42e5398304273b54916cc90441ade23317d85 (patch) | |
tree | 466c63aa34c1680c49e66a3c7b0961297f1d8929 /app/models | |
parent | 3813810cac8eb138ed1819058d122503628d6cba (diff) |
filters now have options to separately match post text, content warnings/titles, & hashtags + option to filter threads containing a matching post
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/custom_filter.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/custom_filter.rb b/app/models/custom_filter.rb index d4cb2206e..a1db3940c 100644 --- a/app/models/custom_filter.rb +++ b/app/models/custom_filter.rb @@ -14,6 +14,10 @@ # whole_word :boolean default(TRUE), not null # exclude_media :boolean default(FALSE), not null # media_only :boolean default(FALSE), not null +# thread :boolean default(FALSE), not null +# spoiler :boolean default(FALSE), not null +# tags :boolean default(FALSE), not null +# status_text :boolean default(FALSE), not null # class CustomFilter < ApplicationRecord @@ -45,6 +49,7 @@ class CustomFilter < ApplicationRecord def remove_cache Rails.cache.delete("filters:#{account_id}") + Rails.cache.delete("filtered_threads:#{account_id}") Redis.current.publish("timeline:#{account_id}", Oj.dump(event: :filters_changed)) end |