diff --git a/src/model/friend.cpp b/src/model/friend.cpp index 433076148..faac6c596 100644 --- a/src/model/friend.cpp +++ b/src/model/friend.cpp @@ -87,11 +87,9 @@ void Friend::setAlias(const QString& alias) } for (Group* g : GroupList::getAllGroups()) { - if (userAlias.isEmpty()) { - g->updateUsername(friendPk, userName); - continue; + if (g->getPeerList().contains(friendPk)) { + g->updateUsername(friendPk, newDisplayed); } - g->updateUsername(friendPk, userAlias); } }