diff options
-rw-r--r-- | protocols/Icq10/src/server.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/protocols/Icq10/src/server.cpp b/protocols/Icq10/src/server.cpp index ef7da1fe7a..4b2fea9689 100644 --- a/protocols/Icq10/src/server.cpp +++ b/protocols/Icq10/src/server.cpp @@ -463,11 +463,18 @@ void CIcqProto::ProcessBuddyList(const JSONNode &ev) { for (auto &it : ev["groups"]) { CMStringW szGroup = it["name"].as_mstring(); - Clist_GroupCreate(0, szGroup); + bool bCreated = false; for (auto &buddy : it["buddies"]) { MCONTACT hContact = ParseBuddyInfo(buddy); - db_set_ws(hContact, "CList", "Group", szGroup); + if (db_get_sm(hContact, "CList", "Group").IsEmpty()) { + if (!bCreated) { + Clist_GroupCreate(0, szGroup); + bCreated = true; + } + + db_set_ws(hContact, "CList", "Group", szGroup); + } } } |