diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-11-12 11:49:27 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-11-12 11:49:27 +0000 |
commit | 78ff63a9c7eb6cc9adb485c956cd31de69480733 (patch) | |
tree | 13c4475d4987d00e848a148378d4cd84965ccafe /syweb/webclient/home/home-controller.js | |
parent | SYWEB-140: Redact button layout. (diff) | |
download | synapse-78ff63a9c7eb6cc9adb485c956cd31de69480733.tar.xz |
Remove getRoomAliasAndDisplayName: room name logic is in mRoomName filter, and this method was only used for /publicRooms requests.
Diffstat (limited to 'syweb/webclient/home/home-controller.js')
-rw-r--r-- | syweb/webclient/home/home-controller.js | 13 |
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; + } } } ); |