1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(groups): don't add friend alias to groups they aren't in

Fix #5657
This commit is contained in:
Anthony Bilinski 2019-05-13 23:56:54 -07:00
parent 6522988e8c
commit 6801298e96
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -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);
}
}