summary refs log tree commit diff
path: root/syweb
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2014-11-11 05:50:55 +0000
committerMatthew Hodgson <matthew@matrix.org>2014-11-11 05:50:55 +0000
commitbf944d921945601ee4b984684e16c956a4991f59 (patch)
treea4ac177fb663b8c1f7484cf011c5750cf411214d /syweb
parentapply some cache headers to try to make the content repo less nutso (diff)
downloadsynapse-bf944d921945601ee4b984684e16c956a4991f59.tar.xz
fix stupid truncation bug
Diffstat (limited to 'syweb')
-rw-r--r--syweb/webclient/components/matrix/event-handler-service.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/syweb/webclient/components/matrix/event-handler-service.js b/syweb/webclient/components/matrix/event-handler-service.js
index 34c6f34981..f51031f4cd 100644
--- a/syweb/webclient/components/matrix/event-handler-service.js
+++ b/syweb/webclient/components/matrix/event-handler-service.js
@@ -304,6 +304,7 @@ function(matrixService, $rootScope, $q, $timeout, $filter, mPresence, notificati
      */
     var getUserDisplayName = function(room_id, user_id, wrap) {
         var displayName;
+        // XXX: this is getting called *way* too often - at least once per every room member per every digest...
 
         // Get the user display name from the member list of the room
         var member = modelService.getMember(room_id, user_id);
@@ -337,14 +338,16 @@ function(matrixService, $rootScope, $q, $timeout, $filter, mPresence, notificati
 
         if (undefined === displayName) {
             // By default, use the user ID
-            displayName = user_id;
-            if (wrap) {
+            if (wrap && user_id.indexOf(':') >= 0) {
                 displayName = user_id.substr(0, user_id.indexOf(':')) + " " + user_id.substr(user_id.indexOf(':'));
             }
             else {
                 displayName = user_id;
             }
         }
+        
+        //console.log("getUserDisplayName(" + room_id + ", " + user_id + ", " + wrap +") = " + displayName);
+        
         return displayName;
     };