diff options
author | George Hazan <ghazan@miranda.im> | 2020-01-09 22:45:54 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-01-09 22:45:54 +0300 |
commit | 82e580ccd9e7e9428672b9bc013278c57caaceca (patch) | |
tree | 0e648494999d440fb01499f501fb0cafcf5267a7 /protocols | |
parent | 1ce38489aab677d33b5f895acdea80cb8eb1a1d2 (diff) |
fixes #2180 (ICQ: some existing contacts do not get IcqDeleted key)
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/ICQ-WIM/src/utils.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/protocols/ICQ-WIM/src/utils.cpp b/protocols/ICQ-WIM/src/utils.cpp index 197e3bc6e7..f1b20c59f0 100644 --- a/protocols/ICQ-WIM/src/utils.cpp +++ b/protocols/ICQ-WIM/src/utils.cpp @@ -132,10 +132,15 @@ void CIcqProto::Json2int(MCONTACT hContact, const JSONNode &node, const char *sz void CIcqProto::Json2string(MCONTACT hContact, const JSONNode &node, const char *szJson, const char *szSetting) { const JSONNode &var = node[szJson]; - if (var) - setWString(hContact, szSetting, var.as_mstring()); - else - delSetting(hContact, szSetting); + if (var) { + CMStringW wszStr(var.as_mstring()); + if (wszStr == L"[deleted]") { + setByte(hContact, "IcqDeleted", 1); + Contact_PutOnList(hContact); + } + else setWString(hContact, szSetting, wszStr); + } + else delSetting(hContact, szSetting); } ///////////////////////////////////////////////////////////////////////////////////////// |