summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-09-10 11:21:20 +0100
committerDavid Baker <dbkr@matrix.org>2014-09-10 11:21:20 +0100
commit7411794fa1d584a3be4c553406ab6406dee2f2e2 (patch)
treeca0dd0a1ec56eb3d8fdd92a5579c15992cc8127c
parentLess buggy rejection of calls when busy (diff)
downloadsynapse-7411794fa1d584a3be4c553406ab6406dee2f2e2.tar.xz
Show mxid in call bar for users with no displayname
Diffstat (limited to '')
-rw-r--r--webclient/app-controller.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/webclient/app-controller.js b/webclient/app-controller.js
index 55397ed216..feda0f6b57 100644
--- a/webclient/app-controller.js
+++ b/webclient/app-controller.js
@@ -96,9 +96,14 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
         delete roomMembers[matrixService.config().user_id];
 
         $rootScope.currentCall.user_id = Object.keys(roomMembers)[0];
+
+        // set it to the user ID until we fetch the display name
+        $rootScope.currentCall.userProfile = { displayname: $rootScope.currentCall.user_id };
+
         matrixService.getProfile($rootScope.currentCall.user_id).then(
             function(response) {
-                $rootScope.currentCall.userProfile = response.data;
+                if (response.data.displayname) $rootScope.currentCall.userProfile.displayname = response.data.displayname;
+                if (response.data.avatar_url) $rootScope.currentCall.userProfile.avatar_url = response.data.avatar_url;
             },
             function(error) {
                 $scope.feedback = "Can't load user profile";