diff options
author | George Hazan <ghazan@miranda.im> | 2019-09-24 21:14:17 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-09-24 21:14:17 +0300 |
commit | 8f6f88cb88c460eaf0ca96b0db7cbda3ab010075 (patch) | |
tree | 5f5dba06d2eb26f45806c934784f02cd407ed5c5 /protocols | |
parent | 2866e60ebbd17239eb075ec74de3df9a6dc6c42d (diff) |
fixes #2077 (ICQ-WIM: ignored contacts aren't listed in Options - Contacts - Ignore)
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/ICQ-WIM/src/ignore.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
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) { |