Add option to not consider word boundaries when processing keyword filtering (#7975)

* Add option to not consider word boundaries when filtering phrases

* Add a few tests for keyword/phrase filtering
This commit is contained in:
ThibG 2018-07-09 02:22:09 +02:00 committed by Eugen Rochko
parent 451e585b97
commit 1ca4e51eb3
9 changed files with 61 additions and 11 deletions

View file

@ -0,0 +1,17 @@
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
class AddWholeWordToCustomFilter < ActiveRecord::Migration[5.2]
include Mastodon::MigrationHelpers
disable_ddl_transaction!
def change
safety_assured do
add_column_with_default :custom_filters, :whole_word, :boolean, default: true, allow_null: false
end
end
def down
remove_column :custom_filters, :whole_word
end
end