diff options
Diffstat (limited to 'core/Controller/AutoCompleteController.php')
-rw-r--r-- | core/Controller/AutoCompleteController.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/Controller/AutoCompleteController.php b/core/Controller/AutoCompleteController.php index 0b692d85277..c873603fd0e 100644 --- a/core/Controller/AutoCompleteController.php +++ b/core/Controller/AutoCompleteController.php @@ -35,6 +35,7 @@ use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; use OCP\Collaboration\AutoComplete\AutoCompleteEvent; +use OCP\Collaboration\AutoComplete\AutoCompleteFilterEvent; use OCP\Collaboration\AutoComplete\IManager; use OCP\Collaboration\Collaborators\ISearch; use OCP\EventDispatcher\IEventDispatcher; @@ -88,6 +89,18 @@ class AutoCompleteController extends OCSController { $this->dispatcher->dispatch(IManager::class . '::filterResults', $event); $results = $event->getResults(); + $event = new AutoCompleteFilterEvent( + $results, + $search, + $itemType, + $itemId, + $sorter, + $shareTypes, + $limit, + ); + $this->dispatcher->dispatchTyped($event); + $results = $event->getResults(); + $exactMatches = $results['exact']; unset($results['exact']); $results = array_merge_recursive($exactMatches, $results); |