summary refs log tree commit diff
path: root/syweb/webclient/home/home-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'syweb/webclient/home/home-controller.js')
-rw-r--r--syweb/webclient/home/home-controller.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/syweb/webclient/home/home-controller.js b/syweb/webclient/home/home-controller.js
index 467db09b3a..6a3c079295 100644
--- a/syweb/webclient/home/home-controller.js
+++ b/syweb/webclient/home/home-controller.js
@@ -54,10 +54,17 @@ angular.module('HomeController', ['matrixService', 'eventHandlerService', 'Recen
                 $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, modelService.getRoomAliasAndDisplayName(room));
                     
+                    if (room.aliases && room.aliases.length > 0) {
+                        room.room_display_name = room.aliases[0];
+                        room.room_alias = room.aliases[0];
+                    }
+                    else if (room.name) {
+                        room.room_display_name = room.name;
+                    }
+                    else {
+                        room.room_display_name = room.room_id;
+                    }
                 }
             }
         );