diff options
author | George Hazan <ghazan@miranda.im> | 2019-09-25 12:47:10 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-09-25 12:47:10 +0300 |
commit | 9ffba2f6e7f9961d4211960bd8619ff06f4dba1e (patch) | |
tree | daf938911bed7b0a16134c13e90674d105326f08 /protocols/ICQ-WIM/src/server.cpp | |
parent | 30387a749280e955af923d4a06c325651fe964ac (diff) |
fixes #2073 (ICQ-WIM: a contact cannot be moved correctly from root to any group)
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index 2bfae8c6f1..13b868c525 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -169,8 +169,12 @@ void CIcqProto::ConnectionFailed(int iReason, int iErrorCode) void CIcqProto::MoveContactToGroup(MCONTACT hContact, const wchar_t *pwszGroup, const wchar_t *pwszNewGroup) { - Push(new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/buddylist/moveBuddy") - << AIMSID(this) << WCHAR_PARAM("buddy", GetUserId(hContact)) << GROUP_PARAM("group", pwszGroup) << GROUP_PARAM("newGroup", 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); + if (mir_wstrlen(pwszNewGroup)) + pReq << GROUP_PARAM("newGroup", pwszNewGroup); + Push(pReq); } ///////////////////////////////////////////////////////////////////////////////////////// |