diff options
author | George Hazan <ghazan@miranda.im> | 2019-04-17 13:32:05 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-04-17 13:32:05 +0300 |
commit | 2c4add47fc901d243ed97eb28834fd1fba265b5d (patch) | |
tree | dc50c61d79b00ce219b33ba08867e6264866006d /protocols/ICQ-WIM/src/ignore.cpp | |
parent | 2390b3149a00142719381f722a7c9f4118c99341 (diff) |
ICQ-WIM: we also should set pdMode if we add UINs to ignore list
Diffstat (limited to 'protocols/ICQ-WIM/src/ignore.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/ignore.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/protocols/ICQ-WIM/src/ignore.cpp b/protocols/ICQ-WIM/src/ignore.cpp index ae7de463b4..53edac0c08 100644 --- a/protocols/ICQ-WIM/src/ignore.cpp +++ b/protocols/ICQ-WIM/src/ignore.cpp @@ -44,10 +44,13 @@ void CIcqProto::ProcessPermissions(const JSONNode &ev) p->m_iApparentMode = ID_STATUS_ONLINE; } + m_bIgnoreListEmpty = true; for (auto &it : ev["ignores"]) { auto *p = FindContactByUIN(it.as_mstring()); - if (p) + if (p) { p->m_iApparentMode = ID_STATUS_OFFLINE; + m_bIgnoreListEmpty = false; + } } for (auto &it: m_arCache) { @@ -63,6 +66,9 @@ void CIcqProto::ProcessPermissions(const JSONNode &ev) void CIcqProto::SetPermitDeny(const CMStringW &userId, bool bAllow) { - Push(new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/preference/setPermitDeny") - << AIMSID(this) << WCHAR_PARAM((bAllow) ? "pdIgnoreRemove" : "pdIgnore", userId)); + auto *pReq = new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/preference/setPermitDeny") + << AIMSID(this) << WCHAR_PARAM((bAllow) ? "pdIgnoreRemove" : "pdIgnore", userId); + if (!m_bIgnoreListEmpty) + pReq << CHAR_PARAM("pdMode", "denySome"); + Push(pReq); } |