diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-11-14 11:13:03 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-11-14 11:13:03 +0000 |
commit | 974206ebe1a73a6d9c470b7f02bad74cb37d2e3c (patch) | |
tree | 55fa9eb15d7e7d0a631441b0429e9c01aba87c85 /syweb/webclient/room | |
parent | Add notification-service unit tests. (diff) | |
download | synapse-974206ebe1a73a6d9c470b7f02bad74cb37d2e3c.tar.xz |
Use mUserDisplayName filter in more places. Store power_level[norm] for each RoomMember.
Diffstat (limited to 'syweb/webclient/room')
-rw-r--r-- | syweb/webclient/room/room-controller.js | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/syweb/webclient/room/room-controller.js b/syweb/webclient/room/room-controller.js index 67372a804f..9a9381ed98 100644 --- a/syweb/webclient/room/room-controller.js +++ b/syweb/webclient/room/room-controller.js @@ -15,8 +15,8 @@ limitations under the License. */ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput', 'angular-peity']) -.controller('RoomController', ['$modal', '$filter', '$scope', '$timeout', '$routeParams', '$location', '$rootScope', 'matrixService', 'mPresence', 'eventHandlerService', 'mFileUpload', 'matrixPhoneService', 'MatrixCall', 'modelService', 'recentsService', 'commandsService', - function($modal, $filter, $scope, $timeout, $routeParams, $location, $rootScope, matrixService, mPresence, eventHandlerService, mFileUpload, matrixPhoneService, MatrixCall, modelService, recentsService, commandsService) { +.controller('RoomController', ['$modal', '$filter', '$scope', '$timeout', '$routeParams', '$location', '$rootScope', 'matrixService', 'mPresence', 'eventHandlerService', 'mFileUpload', 'matrixPhoneService', 'MatrixCall', 'modelService', 'recentsService', 'commandsService', 'mUserDisplayNameFilter', + function($modal, $filter, $scope, $timeout, $routeParams, $location, $rootScope, matrixService, mPresence, eventHandlerService, mFileUpload, matrixPhoneService, MatrixCall, modelService, recentsService, commandsService, mUserDisplayNameFilter) { 'use strict'; var MESSAGES_PER_PAGINATION = 30; var THUMBNAIL_SIZE = 320; @@ -162,24 +162,12 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput', 'a $scope.state.waiting_for_joined_event = false; onInit3(); } - else if (event.state_key === $scope.state.user_id && "invite" !== event.membership && "join" !== event.membership) { - var user; - - if ($scope.members[event.user_id]) { - user = $scope.members[event.user_id].displayname; - } - if (user) { - user = user + " (" + event.user_id + ")"; - } - else { - user = event.user_id; - } - + else if (event.state_key === $scope.state.user_id && "invite" !== event.membership && "join" !== event.membership) { if ("ban" === event.membership) { - $scope.state.permission_denied = "You have been banned by " + user; + $scope.state.permission_denied = "You have been banned by " + mUserDisplayNameFilter(event.user_id); } else { - $scope.state.permission_denied = "You have been kicked by " + user; + $scope.state.permission_denied = "You have been kicked by " + mUserDisplayNameFilter(event.user_id); } } else { |