avoid displaying empty strings as names when removing a contact

This commit is contained in:
ansuz 2022-09-22 14:15:27 +05:30
parent 174d97c442
commit 961e816cef

View File

@ -590,8 +590,9 @@ define([
if (!channel.isFriendChat) { return; }
var curvePublic = channel.curvePublic;
var friend = contactsData[curvePublic] || friendData;
var name = Util.fixHTML(UI.getDisplayName(friend.name || friend.displayName));
var content = h('div', [
UI.setHTML(h('p'), Messages._getKey('contacts_confirmRemove', [Util.fixHTML(friend.name)])),
UI.setHTML(h('p'), Messages._getKey('contacts_confirmRemove', [ name ])),
]);
UI.confirm(content, function (yes) {
if (!yes) { return; }