From e51032a53ddab258fdb77bd7745684113e2cbfb4 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Wed, 6 Feb 2019 11:27:22 +0500 Subject: [PATCH] add fallback to peer alias if there is no profile.fullname specified in redraw profile functions --- js/twister_actions.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/twister_actions.js b/js/twister_actions.js index aa6a01a..9af4ed3 100644 --- a/js/twister_actions.js +++ b/js/twister_actions.js @@ -556,6 +556,9 @@ function loadAvatarForEdit(peerAlias, req) { function redrawProfileAndAvatar(peerAlias, profileData, avatarData) { var containerElem; + if (!profileData.fullname) + profileData.fullname = peerAlias; + if (peerAlias === defaultScreenName) { containerElem = $('.module .mini-profile-info, .userMenu .mini-profile-info'); containerElem.find('.mini-profile-name').text(profileData.fullname); @@ -614,6 +617,9 @@ function redrawProfileAndAvatar(peerAlias, profileData, avatarData) { function redrawProfile(peerAlias, profileData) { var containerElem; + if (!profileData.fullname) + profileData.fullname = peerAlias; + if (peerAlias === defaultScreenName) $('.module .mini-profile-info, .userMenu .mini-profile-info') .find('.mini-profile-name').text(profileData.fullname);