Fix emoji avatar in friend profile modal
This commit is contained in:
1 parent
797d13edad
commit
5783f00888
1 file changed
+7
-2
+7
-2
@@ -1195,8 +1195,13 @@ window.openFriendProfile = async function(uid) {
|
|||||||
const displayName = profile.displayName || 'No Display Name';
|
const displayName = profile.displayName || 'No Display Name';
|
||||||
|
|
||||||
const avatarEl = document.getElementById('fp-avatar');
|
const avatarEl = document.getElementById('fp-avatar');
|
||||||
if (profile.avatarUrl) avatarEl.innerHTML = `<img src="${esc(profile.avatarUrl)}" style="width:100%;height:100%;object-fit:cover;border-radius:50%">`;
|
if (profile.avatarUrl && isEmoji(profile.avatarUrl)) {
|
||||||
else avatarEl.textContent = (nick || displayName)[0].toUpperCase();
|
avatarEl.innerHTML = `<span style="font-size:32px">${profile.avatarUrl}</span>`;
|
||||||
|
} else if (profile.avatarUrl) {
|
||||||
|
avatarEl.innerHTML = `<img src="${esc(profile.avatarUrl)}" style="width:100%;height:100%;object-fit:cover;border-radius:50%">`;
|
||||||
|
} else {
|
||||||
|
avatarEl.textContent = (nick || displayName)[0].toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById('fp-name-text').textContent = nick || displayName;
|
document.getElementById('fp-name-text').textContent = nick || displayName;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user