diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-08-13 16:29:37 +0100 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-08-13 16:29:46 +0100 |
commit | 6904952ec4c34b17e3586e1dd52201ebfc4d9e66 (patch) | |
tree | 25e87041d35bd25b1ce34953bc2e5f38c416f45d /webclient | |
parent | typo (diff) | |
download | synapse-6904952ec4c34b17e3586e1dd52201ebfc4d9e66.tar.xz |
Store public room id > alias mappings.
Diffstat (limited to '')
-rw-r--r-- | webclient/rooms/rooms-controller.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webclient/rooms/rooms-controller.js b/webclient/rooms/rooms-controller.js index a4499761bc..293ea8bc8b 100644 --- a/webclient/rooms/rooms-controller.js +++ b/webclient/rooms/rooms-controller.js @@ -55,9 +55,15 @@ angular.module('RoomsController', ['matrixService']) for (var i=0; i<data.length; i++) { var alias = matrixService.getRoomIdToAliasMapping(data[i].room_id); if (alias) { + // use the existing alias from storage data[i].room_alias = alias; } + else if (data[i].room_alias) { + // save the mapping + matrixService.createRoomIdToAliasMapping(data[i].room_id, data[i].room_alias); + } else { + // last resort use the room id data[i].room_alias = data[i].room_id; } } |