diff options
author | Matthew Hodgson <matthew@matrix.org> | 2014-09-23 16:11:12 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2014-09-23 16:12:25 +0100 |
commit | c9f73bd3258e40f5728a9910f9f5051240ca682e (patch) | |
tree | 55578fdb3c7d5b19e63514b7b6d6b2eeb3146ac9 /webclient | |
parent | Update API docs to include notes on /rooms/$roomid/state (diff) | |
download | synapse-c9f73bd3258e40f5728a9910f9f5051240ca682e.tar.xz |
fix one cause of SYWEB-53
Diffstat (limited to 'webclient')
-rw-r--r-- | webclient/components/matrix/matrix-filter.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/webclient/components/matrix/matrix-filter.js b/webclient/components/matrix/matrix-filter.js index 328e3a7086..1a64dc126c 100644 --- a/webclient/components/matrix/matrix-filter.js +++ b/webclient/components/matrix/matrix-filter.js @@ -49,15 +49,12 @@ angular.module('matrixFilter', []) if (member.state_key !== user_id) { if (member.state_key in $rootScope.presence) { - // If the user is available in presence, use the displayname there + // If the user is listed in presence, use the displayname there // as it is the most uptodate - roomName = $rootScope.presence[member.state_key].content.displayname; + roomName = $rootScope.presence[member.state_key].content.displayname || member.state_key; } - else if (member.content.displayname) { - roomName = member.content.displayname; - } - else { - roomName = member.state_key; + else { + roomName = member.content.displayname || member.state_key; } } } |