diff options
author | George Hazan <ghazan@miranda.im> | 2019-12-09 20:15:18 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-12-09 20:15:18 +0300 |
commit | 7f3f779d66c013ae106d005c97c7a4861d660235 (patch) | |
tree | 72ad40ae6da66462f9413271df50ce8f3b01a2e1 /protocols/ICQ-WIM/src/server.cpp | |
parent | 0a4cd22b70ac012d74c7df64d29cbe8afbc17e40 (diff) |
fixes #2137 (ICQ-WIM: no need to remove contacts marked as 'deleted')
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index c23b9d6ef9..44cfa13278 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -169,9 +169,12 @@ void CIcqProto::ConnectionFailed(int iReason, int iErrorCode) void CIcqProto::MoveContactToGroup(MCONTACT hContact, const wchar_t *pwszGroup, const wchar_t *pwszNewGroup) { - auto *pReq = new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/buddylist/moveBuddy") << AIMSID(this) << WCHAR_PARAM("buddy", GetUserId(hContact)); - if (mir_wstrlen(pwszGroup)) - pReq << GROUP_PARAM("group", pwszGroup); + // otherwise we'll get a server error + if (!mir_wstrlen(pwszGroup)) + return; + + auto *pReq = new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/buddylist/moveBuddy") << AIMSID(this) << WCHAR_PARAM("buddy", GetUserId(hContact)) + << GROUP_PARAM("group", pwszGroup); if (mir_wstrlen(pwszNewGroup)) pReq << GROUP_PARAM("newGroup", pwszNewGroup); Push(pReq); |