From 82e580ccd9e7e9428672b9bc013278c57caaceca Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 9 Jan 2020 22:45:54 +0300 Subject: fixes #2180 (ICQ: some existing contacts do not get IcqDeleted key) --- protocols/ICQ-WIM/src/utils.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'protocols') 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); } ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3