mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-18 00:43:30 +03:00
Store public room id > alias mappings.
This commit is contained in:
parent
9c3d3c25cc
commit
6904952ec4
1 changed files with 6 additions and 0 deletions
|
@ -55,9 +55,15 @@ angular.module('RoomsController', ['matrixService'])
|
||||||
for (var i=0; i<data.length; i++) {
|
for (var i=0; i<data.length; i++) {
|
||||||
var alias = matrixService.getRoomIdToAliasMapping(data[i].room_id);
|
var alias = matrixService.getRoomIdToAliasMapping(data[i].room_id);
|
||||||
if (alias) {
|
if (alias) {
|
||||||
|
// use the existing alias from storage
|
||||||
data[i].room_alias = alias;
|
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 {
|
else {
|
||||||
|
// last resort use the room id
|
||||||
data[i].room_alias = data[i].room_id;
|
data[i].room_alias = data[i].room_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue