summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src/server.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-09-25 12:47:10 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-09-25 12:47:10 +0300
commit9ffba2f6e7f9961d4211960bd8619ff06f4dba1e (patch)
treedaf938911bed7b0a16134c13e90674d105326f08 /protocols/ICQ-WIM/src/server.cpp
parent30387a749280e955af923d4a06c325651fe964ac (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.cpp8
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);
}
/////////////////////////////////////////////////////////////////////////////////////////