add error message

This commit is contained in:
daria 2026-04-30 13:08:52 +03:00
parent 25c473777a
commit 5c3c3d7d47
No known key found for this signature in database
GPG Key ID: 3B75240E6B2F2701

View File

@ -629,7 +629,10 @@ define([
content: [Icons.get('unfriend'), h('span', Messages.contacts_remove)],
action: function () {
var channel = state.channels[id];
if (!channel.isFriendChat) { return; }
if (!channel.isFriendChat) {
UI.warn(Messages.error);
return;
}
var curvePublic = channel.curvePublic;
var friend = contactsData[curvePublic] || friendData;
var name = Util.fixHTML(UI.getDisplayName(friend.name || friend.displayName));