summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-09-06 09:57:13 -0700
committerEmmanuel ROHEE <manu@Emmanuels-MacBook-Pro.local>2014-09-08 11:28:50 +0200
commitdd2ae6412088a30a7a2eecd7d8ba155f2b8396ff (patch)
tree9b1861d9438558f63b7bcd926eb359bda6a39379 /webclient/components
parentUse the room_display_name when presenting on the home page, and not the room_... (diff)
downloadsynapse-dd2ae6412088a30a7a2eecd7d8ba155f2b8396ff.tar.xz
Set the room_alias field when we encounter a new one, rather than only from local storage.
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/matrix-service.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/webclient/components/matrix/matrix-service.js b/webclient/components/matrix/matrix-service.js
index a1b9691f05..3c28c52fbe 100644
--- a/webclient/components/matrix/matrix-service.js
+++ b/webclient/components/matrix/matrix-service.js
@@ -525,7 +525,6 @@ angular.module('matrixService', [])
                 room_alias: undefined,
                 room_display_name: undefined
             };
-            
             var alias = this.getRoomIdToAliasMapping(room.room_id);
             if (alias) {
                 // use the existing alias from storage
@@ -539,6 +538,7 @@ angular.module('matrixService', [])
                 // TODO: select the smarter alias from the array
                 this.createRoomIdToAliasMapping(room.room_id, room.aliases[0]);
                 result.room_display_name = room.aliases[0];
+                result.room_alias = room.aliases[0];
             }
             else if (room.membership === "invite" && "inviter" in room) {
                 result.room_display_name = room.inviter + "'s room";
@@ -551,7 +551,6 @@ angular.module('matrixService', [])
         },
         
         createRoomIdToAliasMapping: function(roomId, alias) {
-            //console.log("creating mapping between " + roomId + " and " + alias);
             roomIdToAlias[roomId] = alias;
             aliasToRoomId[alias] = roomId;
             // localStorage.setItem(MAPPING_PREFIX+roomId, alias);