diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-30 20:11:19 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-30 20:11:19 +0300 |
commit | f6e89cd758c1df231b478c4f530af6216f991858 (patch) | |
tree | 3479cf2b99ec44ae9dafe8856d2ab19afddf7747 | |
parent | 03c1382719f1322f54d23547d98f7b554f31f718 (diff) |
fixes #1664 (Every time ICQ10 creates General and Temporary groups)
-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); + } } } |