diff --git a/js/controller/ActivityController.js b/js/controller/ActivityController.js index 4208e702d..acc26cf9c 100644 --- a/js/controller/ActivityController.js +++ b/js/controller/ActivityController.js @@ -26,9 +26,10 @@ import CommentCollection from '../legacy/commentcollection'; import CommentModel from '../legacy/commentmodel'; class ActivityController { - constructor ($scope, CardService, ActivityService) { + constructor ($scope, CardService, ActivityService, BoardService) { 'ngInject'; this.cardservice = CardService; + this.boardservice = BoardService; this.activityservice = ActivityService; this.$scope = $scope; this.type = ''; @@ -59,8 +60,12 @@ class ActivityController { } $target.atwho({ at: "@", - data:[{id: 'johndoe', label: 'John Doe'}], callbacks: { + remoteFilter: function(query, callback) { + let uids = self.boardservice.getUsers(); + uids = uids.filter(x => x.uid.toLowerCase().includes(query.toLowerCase()) || x.displayname.toLowerCase().includes(query.toLowerCase())); + callback(uids); + }, highlighter: function (li) { // misuse the highlighter callback to instead of // highlighting loads the avatars. @@ -74,22 +79,22 @@ class ActivityController { return '