FEATURE: Add in:polls filter to search (#19885)
Allows users to filter search results to posts with polls (if the plugin is enabled).
This commit is contained in:
@@ -134,6 +134,11 @@ function initializePolls(api) {
|
||||
id: "discourse-poll",
|
||||
});
|
||||
api.cleanupStream(cleanUpPolls);
|
||||
|
||||
const siteSettings = api.container.lookup("site-settings:main");
|
||||
if (siteSettings.poll_enabled) {
|
||||
api.addSearchSuggestion("in:polls");
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user