diff options
Diffstat (limited to 'webclient/home/home-controller.js')
-rw-r--r-- | webclient/home/home-controller.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/webclient/home/home-controller.js b/webclient/home/home-controller.js index 62f6ef2d95..547a5c5603 100644 --- a/webclient/home/home-controller.js +++ b/webclient/home/home-controller.js @@ -17,8 +17,8 @@ limitations under the License. 'use strict'; angular.module('HomeController', ['matrixService', 'eventHandlerService', 'RecentsController']) -.controller('HomeController', ['$scope', '$location', 'matrixService', 'eventHandlerService', 'eventStreamService', - function($scope, $location, matrixService, eventHandlerService, eventStreamService) { +.controller('HomeController', ['$scope', '$location', 'matrixService', + function($scope, $location, matrixService) { $scope.config = matrixService.config(); $scope.public_rooms = []; @@ -42,7 +42,13 @@ angular.module('HomeController', ['matrixService', 'eventHandlerService', 'Recen matrixService.publicRooms().then( function(response) { - $scope.public_rooms = matrixService.assignRoomAliases(response.data.chunk); + $scope.public_rooms = response.data.chunk; + for (var i = 0; i < $scope.public_rooms.length; i++) { + var room = $scope.public_rooms[i]; + + // Add room_alias & room_display_name members + angular.extend(room, matrixService.getRoomAliasAndDisplayName(room)); + } } ); }; |