From 8f6f88cb88c460eaf0ca96b0db7cbda3ab010075 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 24 Sep 2019 21:14:17 +0300 Subject: fixes #2077 (ICQ-WIM: ignored contacts aren't listed in Options - Contacts - Ignore) --- protocols/ICQ-WIM/src/ignore.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'protocols') diff --git a/protocols/ICQ-WIM/src/ignore.cpp b/protocols/ICQ-WIM/src/ignore.cpp index 53edac0c08..069d8c1844 100644 --- a/protocols/ICQ-WIM/src/ignore.cpp +++ b/protocols/ICQ-WIM/src/ignore.cpp @@ -46,11 +46,15 @@ void CIcqProto::ProcessPermissions(const JSONNode &ev) m_bIgnoreListEmpty = true; for (auto &it : ev["ignores"]) { - auto *p = FindContactByUIN(it.as_mstring()); - if (p) { - p->m_iApparentMode = ID_STATUS_OFFLINE; - m_bIgnoreListEmpty = false; + CMStringW wszId(it.as_mstring()); + auto *p = FindContactByUIN(wszId); + if (p == nullptr) { + auto hContact = CreateContact(wszId, false); + db_set_b(hContact, "CList", "Hidden", 1); + p = FindContactByUIN(wszId); } + p->m_iApparentMode = ID_STATUS_OFFLINE; + m_bIgnoreListEmpty = false; } for (auto &it: m_arCache) { -- cgit v1.2.3