summaryrefslogtreecommitdiff
path: root/app/Controller/UserAjaxController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller/UserAjaxController.php')
-rw-r--r--app/Controller/UserAjaxController.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/Controller/UserAjaxController.php b/app/Controller/UserAjaxController.php
index ed180471..d93bfe9a 100644
--- a/app/Controller/UserAjaxController.php
+++ b/app/Controller/UserAjaxController.php
@@ -4,6 +4,7 @@ namespace Kanboard\Controller;
use Kanboard\Filter\UserNameFilter;
use Kanboard\Formatter\UserAutoCompleteFormatter;
+use Kanboard\Formatter\UserMentionFormatter;
use Kanboard\Model\UserModel;
/**
@@ -35,9 +36,14 @@ class UserAjaxController extends BaseController
public function mention()
{
$project_id = $this->request->getStringParam('project_id');
- $query = $this->request->getStringParam('q');
+ $query = $this->request->getStringParam('search');
$users = $this->projectPermissionModel->findUsernames($project_id, $query);
- $this->response->json($users);
+
+ $this->response->json(
+ UserMentionFormatter::getInstance($this->container)
+ ->withUsers($users)
+ ->format()
+ );
}
/**