forked from MirrorHub/synapse
SYWEB-15: Always show the room alias as well as its name in the UI
This commit is contained in:
parent
b3a0961c6c
commit
9aed6a06cf
1 changed files with 56 additions and 54 deletions
|
@ -26,11 +26,6 @@ angular.module('matrixFilter', [])
|
|||
// If there is an alias, use it
|
||||
// TODO: only one alias is managed for now
|
||||
var alias = matrixService.getRoomIdToAliasMapping(room_id);
|
||||
if (alias) {
|
||||
roomName = alias;
|
||||
}
|
||||
|
||||
if (undefined === roomName) {
|
||||
|
||||
var room = $rootScope.events.rooms[room_id];
|
||||
if (room) {
|
||||
|
@ -39,6 +34,9 @@ angular.module('matrixFilter', [])
|
|||
if (room_name_event) {
|
||||
roomName = room_name_event.content.name;
|
||||
}
|
||||
else if (alias) {
|
||||
roomName = alias;
|
||||
}
|
||||
else if (room.members) {
|
||||
// Else, build the name from its users
|
||||
// FIXME: Is it still required?
|
||||
|
@ -90,6 +88,10 @@ angular.module('matrixFilter', [])
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Always show the alias in the room displayed name
|
||||
if (roomName && alias && alias !== roomName) {
|
||||
roomName += " (" + alias + ")";
|
||||
}
|
||||
|
||||
if (undefined === roomName) {
|
||||
|
|
Loading…
Reference in a new issue