summary refs log tree commit diff
path: root/webclient/rooms
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-20 17:46:16 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-20 17:46:16 +0200
commit7371e68f55bedff5d88ed0bd504edaed5642a2f5 (patch)
tree4a9d4cec3429cf7799d8e79c5a28715aa85fbd0c /webclient/rooms
parentBF: Apply image place holder only if the image message has the height informa... (diff)
downloadsynapse-7371e68f55bedff5d88ed0bd504edaed5642a2f5.tar.xz
Quick fix to support array of room aliases
Diffstat (limited to 'webclient/rooms')
-rw-r--r--webclient/rooms/rooms-controller.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/webclient/rooms/rooms-controller.js b/webclient/rooms/rooms-controller.js
index a237b59b4e..c25e24c8bc 100644
--- a/webclient/rooms/rooms-controller.js
+++ b/webclient/rooms/rooms-controller.js
@@ -71,9 +71,10 @@ angular.module('RoomsController', ['matrixService', 'mFileInput', 'mFileUpload',
                 // use the existing alias from storage
                 data[i].room_alias = alias;
             }
-            else if (data[i].room_alias) {
+            else if (data[i].aliases && data[i].aliases[0]) {
                 // save the mapping
-                matrixService.createRoomIdToAliasMapping(data[i].room_id, data[i].room_alias);
+                // TODO: select the smarter alias from the array
+                matrixService.createRoomIdToAliasMapping(data[i].room_id, data[i].aliases[0]);
             }
             else {
                 // last resort use the room id