Skip to content
Snippets Groups Projects
Commit 6904952e authored by Kegan Dougal's avatar Kegan Dougal
Browse files

Store public room id > alias mappings.

parent 9c3d3c25
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment