mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-16 22:23:53 +01:00
Show mxid in call bar for users with no displayname
This commit is contained in:
parent
55fe0d8adc
commit
7411794fa1
1 changed files with 6 additions and 1 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue