DEV: Support adding a custom filter on /filter (#27927)

# Context

Currently there is no way to add a custom filter to the experimental `/filter` endpoint. While you can implement a custom `status:` there is no way to include the user's input in a custom query. 

# PR

This PR adds the ability to implement a custom filter. eg. `CUSTOM_FILTER:foo`

- Add `add_filter_custom_filter` for extension
- Add specs
This commit is contained in:
Isaac Janzen
2024-07-17 11:36:38 -05:00
committed by GitHub
parent 6dd09b0868
commit b3e0e920ed
4 changed files with 55 additions and 0 deletions

View File

@@ -127,6 +127,8 @@ class DiscoursePluginRegistry
define_filtered_register :flag_applies_to_types
define_filtered_register :custom_filter_mappings
def self.register_auth_provider(auth_provider)
self.auth_providers << auth_provider
end