Skip to content
Snippets Groups Projects
Commit 7371e68f authored by Emmanuel ROHEE's avatar Emmanuel ROHEE
Browse files

Quick fix to support array of room aliases

parent 2f52e8ee
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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