summary refs log tree commit diff
path: root/webclient/recents
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-28 17:48:55 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-29 09:32:09 +0200
commit246b2a3c3e039bd1eef447cf1e7b5f78bcce20a3 (patch)
tree322534f5f93ed838a457b9018d27f58698fae033 /webclient/recents
parentFix FederationHandler to event.origin (diff)
downloadsynapse-246b2a3c3e039bd1eef447cf1e7b5f78bcce20a3.tar.xz
Renamed matrixService.assignRoomAliases into getRoomAliasAndDisplayName
Diffstat (limited to 'webclient/recents')
-rw-r--r--webclient/recents/recents-controller.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/webclient/recents/recents-controller.js b/webclient/recents/recents-controller.js
index 803ab420f9..1ead08cae8 100644
--- a/webclient/recents/recents-controller.js
+++ b/webclient/recents/recents-controller.js
@@ -53,13 +53,16 @@ angular.module('RecentsController', ['matrixService', 'eventHandlerService'])
                 // Reset data
                 $scope.rooms = {};
 
-                var data = matrixService.assignRoomAliases(response.data.rooms);
-                for (var i=0; i<data.length; i++) {
-                    $scope.rooms[data[i].room_id] = data[i];
+                var rooms = response.data.rooms;
+                for (var i=0; i<rooms.length; i++) {
+                    var room = rooms[i];
+                    
+                    // Add room_alias & room_display_name members
+                    $scope.rooms[room.room_id] = angular.extend(room, matrixService.getRoomAliasAndDisplayName(room));
 
                     // Create a shortcut for the last message of this room
-                    if (data[i].messages && data[i].messages.chunk && data[i].messages.chunk[0]) {
-                        $scope.rooms[data[i].room_id].lastMsg = data[i].messages.chunk[0];
+                    if (room.messages && room.messages.chunk && room.messages.chunk[0]) {
+                        $scope.rooms[room.room_id].lastMsg = room.messages.chunk[0];
                     }
                 }