diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-10-31 11:20:07 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-10-31 11:20:07 +0000 |
commit | ac2a17707037438015560265c1267f6665f5bbd2 (patch) | |
tree | 5cefd01b31e45fc08b67134075c2aab70e9d425c /webclient/room | |
parent | SYWEB-45: Display the user_id of a user when hovering over their avatar next ... (diff) | |
download | synapse-ac2a17707037438015560265c1267f6665f5bbd2.tar.xz |
Add notification-service.js to handle binging/notifications. Shift logic to this service.
Diffstat (limited to 'webclient/room')
-rw-r--r-- | webclient/room/room-controller.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index 59274baccb..2af1e8ae29 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -15,11 +15,21 @@ limitations under the License. */ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput']) -.controller('RoomController', ['$modal', '$filter', '$scope', '$timeout', '$routeParams', '$location', '$rootScope', 'matrixService', 'mPresence', 'eventHandlerService', 'mFileUpload', 'matrixPhoneService', 'MatrixCall', - function($modal, $filter, $scope, $timeout, $routeParams, $location, $rootScope, matrixService, mPresence, eventHandlerService, mFileUpload, matrixPhoneService, MatrixCall) { +.controller('RoomController', ['$modal', '$filter', '$scope', '$timeout', '$routeParams', '$location', '$rootScope', 'matrixService', 'mPresence', 'eventHandlerService', 'mFileUpload', 'matrixPhoneService', 'MatrixCall', 'notificationService', + function($modal, $filter, $scope, $timeout, $routeParams, $location, $rootScope, matrixService, mPresence, eventHandlerService, mFileUpload, matrixPhoneService, MatrixCall, notificationService) { 'use strict'; var MESSAGES_PER_PAGINATION = 30; var THUMBNAIL_SIZE = 320; + + // .html needs this + $scope.containsBingWord = function(content) { + return notificationService.containsBingWord( + matrixService.config().user_id, + matrixService.config().display_name, + matrixService.config().bingWords, + content + ); + }; // Room ids. Computed and resolved in onInit $scope.room_id = undefined; |